title: postgresql, pgadmin error RETURN cannot have a parameter in function returning set
body: <p>I made a function like this</p>
  
  <pre><code>create or replace function get_source2(TableName character varying)
  returns setof integer as
  $$
  declare
      geom geometry;
      snode integer;
  begin
      execute ('select get_source(geom) from '|| TableName)
          into snode;
      return snode;
  end
  $$
  language plpgsql;
  </code></pre>
  
  <p>output data would be array type</p>
  
  <p>so I try to use <code>setof</code>.</p>
  
  <p>If I don't use <code>setof</code>, it runs well but only one result comes out.</p>
  
  <p>However if I use <code>setof</code>
  I get an error like that</p>
  
  <pre><code>error : RETURN cannot have a parameter in function returning set
  </code></pre>