From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
Cc: | Jonathan Hull <jono(at)fabsoftware(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] BUG #2873: Function that returns an empty set with a 'not null' domain errors in 8.2 but not 8.1 |
Date: | 2007-01-09 14:56:23 |
Message-ID: | 7321.1168354583@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> Perhaps a means to mark the record as being null, other than setting all
> the fields to null?
We could probably bypass the call of the domain input function, thereby
avoiding the elog, but the point remains: if we do that, then we have
a NOT-NULL-constrained domain variable that is reading out as NULL.
One way or another we're going to be violating somebody's expectation.
(BTW, I suspect that the case "DECLARE foo nonnulldomain;" already has
this issue, as I think that code path just stores a null without any
ceremony.)
This is closely related to the discussion a couple weeks ago about how
a LEFT JOIN could produce nulls in an output column that was labeled as
having a non-null-domain type. We haven't figured out what is a sane
behavior for that case, either. I'm beginning to think that domains
constrained not null are just fundamentally a bad idea.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-01-09 16:27:20 | Re: [HACKERS] BUG #2873: Function that returns an empty set |
Previous Message | Jim C. Nasby | 2007-01-09 11:36:04 | Re: [HACKERS] BUG #2873: Function that returns an empty set with a 'not null' domain errors in 8.2 but not 8.1 |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-01-09 16:27:20 | Re: [HACKERS] BUG #2873: Function that returns an empty set |
Previous Message | Bruce Momjian | 2007-01-09 14:21:21 | Re: COPY with no WAL, in certain circumstances |