From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AW: to_char() dumps core |
Date: | 2000-10-23 13:43:34 |
Message-ID: | 8053.972308614@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-10-23 14:10:46 | Re: AW: AW: relation ### modified while in use |
Previous Message | Tom Lane | 2000-10-23 13:35:36 | Re: Add support for <xti.h> |