title: PostgreSQL equivalent of Oracle "bulk collect"
body: <p>In PostgreSQL exists some ways to make a statement using bulk collect into like in Oracle?</p>
  
  <p>Example in Oracle:</p>
  
  <pre><code>create or replace procedure prc_tst_bulk_test is
  
  type typ_person is table of tb_person%rowtype;
  v_tb_person typ_person;
  
  begin
  
  select *
  bulk collect into v_tb_person
  from tb_person;
  
  -- make a selection in v_tb_person, for instance    
  select name, count(*) from v_tb_person where age &gt; 50
  union 
  select name, count(*) from v_tb_person where gender = 1
  
  end;
  </code></pre>
  
  <p>Thank you</p>