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 11:19:41
Message-ID: 20060921111941.GC10331@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 21, 2006 at 01:06:32PM +0200, Karsten Hilbert wrote:

> gives the result below. It seems inconsistent to me with
> regard to the FOUND variable. I would expect FOUND to always
> be false regardless of whether I use EXECUTE or PERFORM. I
> certainly do not expect it to be true for the third EXECUTE
> even assuming that PERFORM may have a bug. What is it that I
> am missing out on here ?

> select * from test;
> fk_item
> ---------
> (0 Zeilen)
>
> select test();
> psql:00-test.sql:33: NOTICE: running: select 1 from test where fk_item=1324314
> psql:00-test.sql:33: NOTICE: found (execute 1): f
> psql:00-test.sql:33: NOTICE: found (execute 2): f
> psql:00-test.sql:33: NOTICE: found (perform): t
> psql:00-test.sql:33: NOTICE: found (execute 3): t

...

> begin
> cmd := ''select 1 from test where fk_item=1324314'';
> raise notice ''running: %'', cmd;
>
> execute cmd;

And, no, in the actual situation I cannot get rid of the
execute or perform because I need a dynamically generated
query. It's just that the example presented here was reduced
to a static query that could simply be ran as is, too.

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 Martijn van Oosterhout 2006-09-21 11:32:02 Re: execute/perform and FOUND
Previous Message Karsten Hilbert 2006-09-21 11:15:46 Re: execute/perform and FOUND