Re: SetOf Functions

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SetOf Functions
Date: 2005-08-19 17:04:30
Message-ID: 4306111E.1080203@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-08-19 17:08:49 Re: SetOf Functions
Previous Message Joshua D. Drake 2005-08-19 16:48:46 SetOf Functions