Re: PERFORM statement inside procedure - Mailing list pgsql-general

From Tom Lane
Subject Re: PERFORM statement inside procedure
Date
Msg-id 1504.1081284262@sss.pgh.pa.us
Whole thread Raw
In response to Re: PERFORM statement inside procedure  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-general
Bill Moran <wmoran@potentialtech.com> writes:
> Rajat Katyal wrote:
>> But FOUND variable is always returning true even my query is
>> returning *0 records.*

> FOUND appears to work correctly in the hundreds of stored procedures I wrote
> last month.  (At least, I haven't found any problems _yet_)

Works for me too, in recent releases.  I believe PERFORM did not originally
set FOUND ... are you reading the documentation that goes with your server
version?

[ digs in CVS logs... ]  Here we go:

2002-06-24 19:12  tgl

    * src/pl/plpgsql/src/pl_exec.c: plpgsql's PERFORM statement now
    sets FOUND depending on whether any rows were returned by the
    performed query.  Per recent pgsql-general discussion.

So it should work in 7.3 or later.

            regards, tom lane

pgsql-general by date:

Previous
From: Frank Finner
Date:
Subject: Re: Whats missing from postgresql
Next
From: Tom Lane
Date:
Subject: Re: Cursors and Transactions, why?