public inbox for [email protected]
help / color / mirror / Atom feedFrom: Srinath Reddy Sadipiralla <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.
Date: Wed, 10 Dec 2025 22:10:02 +0530
Message-ID: <CAFC+b6q7xFQN=wRP0rOCLat=rWNNNhuhEKOUV-2BJ9HxU5SrAQ@mail.gmail.com> (raw)
In-Reply-To: <CAFC+b6pA+zGmt_WoEMqHNRaAGVOU7KPyUuAFKnEdzeLW1KzzjQ@mail.gmail.com>
References: <[email protected]>
<CAFC+b6pA+zGmt_WoEMqHNRaAGVOU7KPyUuAFKnEdzeLW1KzzjQ@mail.gmail.com>
On Wed, Dec 10, 2025 at 9:32 PM Srinath Reddy Sadipiralla <
[email protected]> wrote:
> why it's not treated as normal
> constraint and why we are not throwing an error
> like the constraint already exists?
>
ah... just after a quick code lookup, remembered that
"not null" is treated as a column property, which is a
flag in pg_attribute catalog table named as "attnotnull",
i guess the reason(s) it's a column property rather than
constraint might be an overkill, adds overhead of entries
in pg_constraint, or historical reasons, please correct me
if i am wrong, still the right way of setting this constraint "ALTER TABLE
test_null_20251210 ALTER COLUMN c1 SET NOT NULL;"
not throwing an error; i think it makes sense to throw an
error here, thoughts?
--
Thanks,
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.
In-Reply-To: <CAFC+b6q7xFQN=wRP0rOCLat=rWNNNhuhEKOUV-2BJ9HxU5SrAQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox