Skip site navigation (1) Skip section navigation (2)

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

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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 13:18:51
Message-ID: 603c8f070901100518j6bd99bdq80caa0dde7fce994@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
> 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.
>
> 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;

+1.  I can't imagine it's good for this to be randomly inconsistent.

...Robert

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2009-01-10 13:36:13
Subject: Re: Synch Rep v5
Previous:From: Bernd HelmleDate: 2009-01-10 12:39:51
Subject: Re: WIP: Automatic view update rules

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2009-01-10 18:30:12
Subject: Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY
Previous:From: Pavel StehuleDate: 2009-01-10 08:51:12
Subject: Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group