public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Alvaro Herrera <[email protected]>
Cc: jian he <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Aleksander Alekseev <[email protected]>
Subject: Re: Catalog domain not-null constraints
Date: Thu, 14 Mar 2024 15:35:52 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On 14.03.24 15:03, Alvaro Herrera wrote:
> On 2024-Mar-14, Peter Eisentraut wrote:
>
>> Perhaps it would make sense if we change the ALTER TABLE command to be like
>>
>> ALTER TABLE t1 ADD IF NOT EXISTS NOT NULL c1
>>
>> Then the behavior is like one would expect.
>>
>> For ALTER TABLE, we would reject this command if IF NOT EXISTS is not
>> specified. (Since this is mainly for pg_dump, it doesn't really matter for
>> usability.) For ALTER DOMAIN, we could accept both variants.
>
> I don't understand why you want to change this behavior, though.
Because in the abstract, the behavior of
ALTER TABLE t1 ADD <constraint specification>
should be to add a constraint.
In the current implementation, the behavior is different for different
constraint types.
view thread (4+ messages) latest in thread
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], [email protected], [email protected]
Subject: Re: Catalog domain not-null constraints
In-Reply-To: <[email protected]>
* 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