Re: SetOf Functions - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: SetOf Functions
Date
Msg-id 4306111E.1080203@dunslane.net
Whole thread Raw
In response to SetOf Functions  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers

Joshua D. Drake wrote:

> Hello,
>
> O.k. I know I can do:
>
> CREATE FUNCTION foo() RETURNS SET OF text AS ' ' language SQL;
>
> Does anyone else think it would be nice to be able to do:
>
> CREATE FUNCTION foo() RETURNS SET OF text,int4,float,timestamp AS ' ' 
> language SQL;
>
> ?
>
> We could even extend it farther:
>
> CREATE FUNCTION foo() RETURNS SET OF text AS first_name, int4 AS id 
> etc....
>
>

You mean like this?

create type bar (firstname text, id int);
create function foo() returns setof bar as ' ' language sql;

cheers

andrew


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Why is lock not released?
Next
From: Bruce Momjian
Date:
Subject: enable_constraint_exclusion GUC name