Re: RETURN QUERY in PL/PgSQL? - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: RETURN QUERY in PL/PgSQL?
Date
Msg-id e51f66da0705040053t2fa40c2et745106a162251a2d@mail.gmail.com
Whole thread Raw
In response to Re: RETURN QUERY in PL/PgSQL?  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
List pgsql-hackers
On 4/25/07, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
> for me RETURNS TABLE (a,b) isn't equialent for (OUT a, OUT b) RETURNS SETOF
> RECORD, but
> it's eq. for RETURNS SETOF RECORD ... and SELECT FROM foo() AS (a, b).
>
> Reason:
>
> example: I have table with attr. cust_id, and I want to use parametrized
> view (table function) where I want to have attr cust_id on output.

You can use table aliases to avoid conflicts.  (t.cust_id)

-- 
marko


pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: RETURN QUERY in PL/PgSQL?
Next
From: Zdenek Kotala
Date:
Subject: Re: Boatload of warnings in CVS HEAD :-(