Hi,
The docs say:
A SELECT INTO statement sets FOUND true if it returns a row,
false if no row is returned.
I'm running a plpgsql procedure from a trigger and
am doing a "SELECT INTO foo bar ..." where a row
matches the selection criteria, but the value of
that row's bar column is NULL. The next statement
is "IF NOT FOUND THEN" and the THEN clause is
being taken.
I would expect that because a row exists, even
though the value assigned is NULL, FOUND would
be TRUE. Are my expectations wrong?
(If so then the docs could use some clarification.
I'll also have to write a PERFORM to test for
the existance of the row followed by a SELECT
INTO to get a (possibly NULL) value. Is
there a better way to write such code?)
Thanks.
---------------------------------
select version();
version
-------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.3 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)
3.4.4 20050721 (Red Hat 3.4.4-2)
(1 row)
Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein