Re: Reading an OUT parameter out of a function call

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Stefan Keller <sfkeller(at)gmail(dot)com>
Cc: pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Reading an OUT parameter out of a function call
Date: 2013-02-25 17:30:47
Message-ID: CAHyXU0xztkOf+7Z-JKmFdqcBmhBWSkmfu-=UEL7ZorhtjhDN9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 25, 2013 at 11:22 AM, Stefan Keller <sfkeller(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2013-02-25 17:34:09 Re: Reading an OUT parameter out of a function call
Previous Message Stefan Keller 2013-02-25 17:22:02 Reading an OUT parameter out of a function call