Re: Reading an OUT parameter out of a function call - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Reading an OUT parameter out of a function call
Date
Msg-id CAHyXU0xztkOf+7Z-JKmFdqcBmhBWSkmfu-=UEL7ZorhtjhDN9A@mail.gmail.com
Whole thread Raw
In response to Reading an OUT parameter out of a function call  (Stefan Keller <sfkeller@gmail.com>)
List pgsql-general
On Mon, Feb 25, 2013 at 11:22 AM, Stefan Keller <sfkeller@gmail.com> wrote:
> Hi,
>
> I have a simple void function:
>
> CREATE OR REPLACE FUNCTION myfn(myparam OUT int)
> AS $$
> BEGIN
>   pnr := 1;
> END;
> $$ LANGUAGE plpgsql;
>
> How do I access myparam?
> I thought this should work with 9.1/9.2: SELECT (myfn()).myparam;
> Or inside another function?

that should work.  what error are you getting?

also,
SELECT myparam FROM myfn();

merlin

pgsql-general by date:

Previous
From: Stefan Keller
Date:
Subject: Reading an OUT parameter out of a function call
Next
From: Pavel Stehule
Date:
Subject: Re: Reading an OUT parameter out of a function call