I had expected the FOUND PL/pgSQL variable to be set by an UPDATE
statement executed by an EXECUTE statement, but it doesn't appear to
work:
try=# drop table try;
DROP TABLE
try=# CREATE TABLE try (
try(# id integer
try(# );
CREATE TABLE
try=# INSERT INTO try VALUES (1);
INSERT 0 1
try=#
David Wheeler [EMAIL PROTECTED] writes:
Note that FOUND is false, but the ROW_COUNT fetched by GET
DIAGNOSTICS is set to 1. So shouldn't FOUND be true? Or does it just
not work with EXECUTE and need to be documented as such? Or am I just
missing something obvious?
It *is* documented:
On Apr 8, 2006, at 14:38, Tom Lane wrote:
It *is* documented: the manual lists the statements that affect FOUND,
and EXECUTE is not among them.
Whether it should be is another question, but that's a definition
disagreement (a/k/a enhancement proposal) not a bug.
I think that:
a. It should