Re: PERFORM not working properly, please help..

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: wilczarz1(at)op(dot)pl
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PERFORM not working properly, please help..
Date: 2010-02-19 11:12:30
Message-ID: 4B7E721E.8030003@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19/02/2010 09:59, wilczarz1(at)op(dot)pl wrote:
> Hi Ray, thanks for reply. Your solution needs to be modified with alias to get executed properly:
>
> CREATE OR REPLACE FUNCTION A3() RETURNS VOID AS $BODY$
> begin
> select * from A1() as dummy ( x double precision );
> return;
> end;
> $BODY$ LANGUAGE 'plpgsql';
>
> but when used: select * from A3() it generates error "query has no destination for result data". That was the reason to use PERFORM in the first place..

Yes, you're absolutely right - the returned data needs a destination. I
should have written:

perform * from A1();

That ought to work too.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2010-02-19 11:24:24 Re: Setting a table to be ignored by autovacuum
Previous Message Pavel Stehule 2010-02-19 11:09:15 Re: PERFORM not working properly, please help..