Re: Returning multiple rows from a function?

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: Bret Schuhmacher <bret(at)thelastmilellc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Returning multiple rows from a function?
Date: 2006-11-27 17:28:57
Message-ID: 20061127172857.GB1448@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 27 11:59, Bret Schuhmacher wrote:
> I'm trying to return multiple rows from a function, but all I can get
> ...
>
> CREATE OR replace function getOnCallVol() RETURNS RECORD AS $$

You should return "SETOF record". See related section of the manual
about SRFs (Set Returning Fucntions).

Regards.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-11-27 17:47:07 Re: IS it a good practice to use SERIAL as Primary Key?
Previous Message Scott Ribe 2006-11-27 17:28:36 Re: OID Perfomance - Object-Relational databases