"Jim C. Nasby" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to