($INBOX_DIR/description missing)
help / color / mirror / Atom feedFrom: Alvaro Herrera <[email protected]>
To: jian he <[email protected]>
Cc: Rushabh Lathia <[email protected]>
Cc: Ashutosh Bapat <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Date: Mon, 17 Mar 2025 12:23:25 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxEOMEuG5gY-x9tHoa+BZx7_+rJnuh5eSWx3r2tBMThu3w@mail.gmail.com>
On 2025-Mar-17, jian he wrote:
> hi.
> I played around with it.
>
> current syntax, we don't need to deal with column constraint grammar.
> like the following can fail directly:
> create table t0(a int constraint nn not null a not valid);
> we only support table constraint cases like:
> alter table lp add constraint nc1 not null a not valid;
>
> since CREATE TABLE with invalid constraint does not make sense, so
> we can just issue a warning. like:
> create table t0(a int, constraint nn not null a not valid);
> WARNING: CREATE TABLE NOT NULL NOT VALID CONSTRAINT WILL SET TO VALID
> the wording needs to change...
Yeah, we discussed this elsewhere. I have an alpha-quality patch for
that, but I wasn't too sure about it ...
[1] https://postgr.es/m/CACJufxEQcHNhN6M18JY1mQcgQq9Gn9ofMeop47SdFDE5B8wbug@mail.gmail.com
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
view thread (44+ 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]
Subject: Re: Support NOT VALID / VALIDATE constraint options for named 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