Re: execute/perform and FOUND

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: execute/perform and FOUND
Date: 2006-09-21 12:23:12
Message-ID: 20060921122312.GE10331@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2006-09-21 12:25:17 Re: execute/perform and FOUND
Previous Message Martijn van Oosterhout 2006-09-21 11:32:02 Re: execute/perform and FOUND