public inbox for [email protected]
help / color / mirror / Atom feedFrom: yanliang lei <[email protected]>
To: Álvaro Herrera <[email protected]>
Cc: Srinath Reddy Sadipiralla <[email protected]>
Cc: [email protected]
Subject: Re:Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.
Date: Sat, 13 Dec 2025 12:15:53 +0800 (CST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
hi
I'm sorry, I didn't notice your reply. I just read your reply and I'm sorry, as I am the end user of the database and not a developer of the database, I don't know how to find commit 14e87ffa5c54.
From the perspective of the end user of the database,In PostgreSQL 18,
Step 1: After the successful execution of "create table test_null_20251210 (c1 int not null, c2 text);",
PostgreSQL 18 will automatically create a not null constraint name for column c1, and the constraint name is "test_null_20251210uc1_not_null",
Step 2: The execution of 'alter table test_null_20251210 add constraint xyzxyz not null c1' did not return any errors.
after the execution of Step 2 , the executing user of the SQL statement "alter table test_null_20251210 add constraint xyzxyz not null c1" in the Step 2 will assume (because there was no error prompt in the Step 2 ) that the not null constraint has been successfully added to column c1, and the name of the constraint is xyzxyz.
----However, in reality, based on the execution results of the SQL database, the Step 2 did not actually succeed.
So, based on this situation,
I believe that there is a problem with the execution result of the Step 2 not reporting an error, which can mislead the user executing the SQL statement in Step 2.
At 2025-12-12 23:01:53, "Álvaro Herrera" <[email protected]> wrote:
>On 2025-Dec-12, yanliang lei wrote:
>
>> Thanks for replying .
>>
>> in the postgresql 18 ,not null has “Constraint Name”,and this is a PostgreSQL 18 New Feature.
>>
>> so , i think that: this problem(BUG #19351) is a bug.
>
>Did you read my other reply?
>https://www.postgresql.org/message-id/202512110716.jpbcheffhdow%40alvherre.pgsql
>
>--
>Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
>"Right now the sectors on the hard disk run clockwise, but I heard a rumor that
>you can squeeze 0.2% more throughput by running them counterclockwise.
>It's worth the effort. Recommended." (Gerry Pourwelle)
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:Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem.
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