Re: setof record "out" syntax and returning records

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: setof record "out" syntax and returning records
Date: 2008-01-20 21:34:44
Message-ID: 13472.1200864884@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> I thought I could write something like
> create or replace testA(out setof record) as...
> but it seems I can't.

No, you can't. Write

create or replace testA() returns setof record as...

instead. "setof" is only allowed in the RETURNS clause --- else we'd
have to figure out what it means to attach "setof" to some OUT
parameters and not others.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2008-01-20 21:48:54 Re: postgres.org src build vs. enterprisedb installer
Previous Message Greg Smith 2008-01-20 21:16:49 Re: postgresql source build instructions for ubuntu 7.04

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-01-20 21:47:54 Re: Minor bug in src/port/rint.c
Previous Message Teodor Sigaev 2008-01-20 21:33:30 Re: message string fixes