From: | Jim Nasby <jim(at)nasby(dot)net> |
---|---|
To: | Alban Hertroys <alban(at)magproductions(dot)nl> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ROWTYPE initialization question |
Date: | 2006-11-17 01:12:48 |
Message-ID: | 519855AE-C271-4476-8E90-8DA42A277715@nasby.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2006-11-17 01:20:34 | Re: Discover temporary INDEX/TABLE name |
Previous Message | Jeremy Smith | 2006-11-17 00:58:08 | Re: PostgreSQL: Question about rules |