Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, "Andrew Gierth" <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-bugs(at)postgresql(dot)org, "postgres hackers" <pgsql-hackers(at)postgresql(dot)org>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Subject: Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY
Date: 2009-01-10 08:51:12
Message-ID: 162867790901100051x54fcca27n86c28304469c2931@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hello

2009/1/10 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Bruce Momjian <bruce(at)momjian(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2009-01-10 13:18:51 Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY
Previous Message Tom Lane 2009-01-09 23:03:35 Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-01-10 09:40:56 Re: Hot standby, slot ids and stuff
Previous Message Stephen Frost 2009-01-10 05:22:44 Re: New patch for Column-level privileges