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

From Bruce Momjian
Subject Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY
Date
Msg-id 200902041832.n14IWl001637@momjian.us
Whole thread Raw
In response to Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY  ("Robert Haas" <robertmhaas@gmail.com>)
Responses Re: [BUGS] BUG #4516: FOUND variable does not work after RETURN QUERY
List pgsql-hackers
Robert Haas wrote:
> > 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.
> >
> > 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.

So should this be applied or just kept for 8.5?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Auto-updated fields
Next
From: Tom Lane
Date:
Subject: Re: add_path optimization