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

From Adrian Klaver
Subject Re: Reading an OUT parameter out of a function call
Date
Msg-id 512BA165.8010402@gmail.com
Whole thread Raw
In response to Reading an OUT parameter out of a function call  (Stefan Keller <sfkeller@gmail.com>)
Responses Re: Reading an OUT parameter out of a function call  (Russell Keane <Russell.Keane@inps.co.uk>)
List pgsql-general
On 02/25/2013 09:22 AM, Stefan Keller 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?

You get the above to load?
I get:
ERROR:  "pnr" is not a known variable
LINE 4:   pnr := 1;

>
> Yours, Stefan
>
>


--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Reading an OUT parameter out of a function call
Next
From: Frank Cavaliero
Date:
Subject: Use, Set Catalog and JDBC questions