title: Return setof record (virtual table) from function
body: <p>I need a Postgres function to return a virtual table (like in Oracle) with custom content. The table would have 3 columns and an unknown number of rows.</p>
  
  <p>I just couldn't find the correct syntax on the internet.</p>
  
  <p>Imagine this:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION "public"."storeopeninghours_tostring" (numeric)
    RETURNS setof record AS
  DECLARE
    open_id ALIAS FOR $1;
    returnrecords setof record;
  BEGIN
    insert into returnrecords('1', '2', '3');
    insert into returnrecords('3', '4', '5');
    insert into returnrecords('3', '4', '5');
    RETURN returnrecords;
  END;
  </code></pre>
  
  <p>How is this written correctly?</p>