On Nov 15, 2006, at 2:07 AM, Alban Hertroys wrote:
I suppose the real question is this: As it is not possible to
initialize
a %ROWTYPE type variable to NULL, is comparing it to NULL valid or
is it
comparing apples and oranges? Does it yield the expected result
(true if
the %ROWTYPE variable is undefined, false once it is defined)?
It seems to work as is, but this part of PL/PgSQL seems to be a bit
unspecific. It might as well have worked by using the FOUND special
variable, or have yielded an error (which it didn't).
Looks like I'll need to device some test cases to prove how the
various
subtleties behave. Now where did I put that can of time...
As far as I can tell from the code, checking a %ROWTYPE variable IS
NULL is perfectly valid. I view it as a bug that you can't assign
NULL to a %ROWTYPE variable.
--
Jim Nasby jim@xxxxxxxxx
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)