Re: Functions returning setof record -- can I use a table type as my return type hint? - Mailing list pgsql-general

From Rob Sargent
Subject Re: Functions returning setof record -- can I use a table type as my return type hint?
Date
Msg-id 4E45585E.9090606@gmail.com
Whole thread Raw
In response to Functions returning setof record -- can I use a table type as my return type hint?  (George MacKerron <g.j.mackerron@lse.ac.uk>)
List pgsql-general
On 08/12/2011 10:04 AM, George MacKerron wrote:
> Hi all.
>
> I have a function returning setof record. The name of a table it acts on is one of its input variables, and its
outputis a set of rows from that table. E.g. for simplicity, imagine it's this pointless function: 
>
> create or replace function select_all_from(table_name text)
> returns setof record as $$
> declare
> begin
>   return query execute 'select * from ' || quote_ident(table_name);
> end
> $$ language 'plpgsql' stable;
>
>
> Please access the attached hyperlink for an important electronic communications disclaimer:
http://lse.ac.uk/emailDisclaimer
>
returns setof table-name


pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: Functions returning setof record -- can I use a table type as my return type hint?
Next
From: George MacKerron
Date:
Subject: Re: Functions returning setof record -- can I use a table type as my return type hint?