Re: RETURNS SETOF primitive returns results in parentheses

From: Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: RETURNS SETOF primitive returns results in parentheses
Date: 2005-10-26 19:57:54
Message-ID: 1130356674.18653.3.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 2005-10-26 at 15:45 -0400, Tom Lane wrote:
> Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr> writes:
> > Wo-ha, makes perfect sense. So, I'd go by with declaring the rec as
> > varchar, instead as of a record. Wich is what I should do in the first
> > place.
>
> Or just return the correct field out of it.
>
> RETURN NEXT returnValue.fieldname;
>
> I think you may have to do it this way because the FOR loop wants a
> record variable.

Yes, you're right. Funny implementation of the FOR loop :)

Mike

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-10-26 20:51:53 Re: SUM not matching up on a JOIN
Previous Message Tom Lane 2005-10-26 19:45:33 Re: RETURNS SETOF primitive returns results in parentheses