Re: Is this a buggy behavior?

From: Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Is this a buggy behavior?
Date: 2024-03-24 15:28:22
Message-ID: eba267a8-7945-4754-bee5-6113cac477fc@gelassene-pferde.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Am 24.03.2024 um 16:17 schrieb Tom Lane:

> To do that, we'd have to remember that you'd said NULL, which we
> don't: the word is just discarded as a noise clause. Considering
> that this usage of NULL isn't even permitted by the SQL standard,
> that seems like a bit too much work.

If I understood correctly, only the NOT NULL expression gets remembered,
but the NULL gets discarded. No, I do not quite get it. Somehow, it has
to be decided whether to create a "check constraint" or not, but this
information is not available any more when creating the primary key? Not
even in some kind of intermediary catalogue?

"Considering that this usage of NULL isn't even permitted by the SQL
standard" is in my opinion a strange argument. To me, it is similar as
to say, well a column has a not null constraint and that must be enough,
we do not check whether the data complies when inserting or updating.
Sure, my example has lots more side effect than silently do the right thing.

Please do not get me wrong. I can totally understand that something
needs to much work to implement. I am just puzzled.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message sud 2024-03-24 15:35:04 Re: Is this a buggy behavior?
Previous Message Tom Lane 2024-03-24 15:17:11 Re: Is this a buggy behavior?