Zeugswetter Andreas SB <[EMAIL PROTECTED]> writes:
> For pass by reference datatypes setting the reference to a null pointer
> for a NULL value imho would be a fine thing in addition to the indicator, 
> no ?

At the moment it generally will be, but that's not certain to be true
forever.  I believe we've had discussions in the past about supporting
multiple kinds of NULL.  (I had the idea this was actually required by
SQL99, in fact, though I can't find anything about it at the moment.)

The obvious way to do that is to commandeer the otherwise unused
contents of a Datum when the associated null-flag is true.  At that
point checking the null-flag will be the only valid way to check for
NULL.

Assuming that the null-kind values are small integers, attempts to
dereference them will still SEGV on reasonable systems, so I don't
think any error checking is lost.  Just don't do "if (datum == NULL)".

                        regards, tom lane

Reply via email to