Re: execute/perform and FOUND - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: execute/perform and FOUND
Date
Msg-id 20060921122312.GE10331@merkur.hilbert.loc
Whole thread Raw
In response to Re: execute/perform and FOUND  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
On Thu, Sep 21, 2006 at 01:32:02PM +0200, Martijn van Oosterhout wrote:

> > So, what about the PERFORM ?  Why does it set FOUND to true?
>
> I beleive that since PERFORM doesn't return anything, it sets the FOUND
> variable to at least indicate whether it did something.
The docs say that it sets FOUND to true if it found rows and
discarded them and sets FOUND to false if it did NOT find
rows (and thus did not discard any, either).

This would indeed make sense.

However, reality seems to look different. In the example I
posted it *sets* FOUND to true even though it couldn't find
any rows. This is counter-intuitive.

I just want to make sure this is the intended behaviour (in
which case I will have to work around it) or whether it's me
misunderstanding something - because it seems
counter-intuitive.

> It's a bit wierd, but I think later versions changed EXECUTE to set
> FOUND also, just to be consistant.
That would be good but doesn't influence the PERFORM issue.

Thanks anyways,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: execute/perform and FOUND
Next
From: Karsten Hilbert
Date:
Subject: Re: execute/perform and FOUND