Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY
Date
Msg-id 162867790901100051x54fcca27n86c28304469c2931@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY
Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY
List pgsql-hackers
Hello

2009/1/10 Tom Lane <tgl@sss.pgh.pa.us>:
> Bruce Momjian <bruce@momjian.us> writes:
>> Uh, is this ready to be applied?
>
> I don't think any consensus has been reached on changing this behavior.
>
>                        regards, tom lane
>

I  thing, so this is bug - RETURN QUERY has to supply FOR SELECT LOOP
RETURN NEXT pattern.

My first patch expected so RETURN QUERY is final statement, so I don't
solve FOUND variable, but Heikki changed this behave.

Without correct FOUND behave we can't to use RETURN QUERY for following pattern

RETURN QUERY some;
IF FOUND THEN RETURN; END IF;
RETURN QUERY some_other;
RETURN;

regards
Pavel Stehule


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: New patch for Column-level privileges
Next
From: Simon Riggs
Date:
Subject: Re: Hot standby, slot ids and stuff