Re: Can't find not null constraint, but \d+ shows that
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: jian he <jian.universality@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-04-18T18:49:52Z
Lists: pgsql-hackers
Attachments
- v2-0001-Better-handle-indirect-constraint-drops.patch (text/x-diff)
On 2024-Apr-13, jian he wrote: > I wonder is there any incompatibility issue, or do we need to say something > about the new behavior when dropping a key column? Umm, yeah, maybe we should document it in ALTER TABLE DROP PRIMARY KEY and in the release notes to note the different behavior. > only minor cosmetic issue: > + if (unconstrained_cols) > i would like change it to > + if (unconstrained_cols != NIL) > > + foreach(lc, unconstrained_cols) > we can change to > + foreach_int(attnum, unconstrained_cols) > per commit > https://git.postgresql.org/cgit/postgresql.git/commit/?id=14dd0f27d7cd56ffae9ecdbe324965073d01a9ff Ah, yeah. I did that, rewrote some comments and refined the tests a little bit to ensure the pg_upgrade behavior is sane. I intend to get this pushed tomorrow, if nothing ugly comes up. CI run: https://cirrus-ci.com/build/5471117953990656 -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "La gente vulgar sólo piensa en pasar el tiempo; el que tiene talento, en aprovecharlo"
Commits
-
Better handle indirect constraint drops
- 0cd711271d42 17.0 landed
-
Add macros for looping through a List without a ListCell.
- 14dd0f27d7cd 17.0 cited