Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-10T11:50:23Z
Lists: pgsql-hackers
On 2025-Mar-10, Rushabh Lathia wrote: > I adjusted the set_attnotnull() API and removed the added > queue_validation parameter. Rather, the function start using wqueue > input parameter as a check. > If wqueue is NULL, skip the queue_validation. Attaching patch here, > but not sure how clear it is, in term of understanding the API. Your > thoughts/inputs? Yeah, I think this makes sense, if it supports all the cases correctly. (If in your code you have any calls of set_attnotnull that pass a NULL wqueue during ALTER TABLE in order to avoid queueing a check, you had better have comments to explain this.) Kindly do not send patches standalone, because the CFbot doesn't understand that it needs to apply it on top of the three previous patches. You need to send all 4 patches every time. You can see the result here: https://commitfest.postgresql.org/patch/5554/ If you click on the "need rebase!" label you'll see that it tried to apply patch 0004 to the top of the master branch, and that obviously failed. (FWIW if you click on the "summary" label you'll also see that the patch has been failing the CI tests since Feb 27.) > Looking further for AdjustNotNullInheritance() I don't see need of > rename this API as it's just adding new error check now for an > existing NOT NULL constraint. OK. > JFYI, I can reproduce the failure Ashutosh Bapat reported, while > running the pg_upgrade test through meson commands. I am > investigating that further. Ah good, thanks. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Industry suffers from the managerial dogma that for the sake of stability and continuity, the company should be independent of the competence of individual employees." (E. Dijkstra)
Commits
-
Allow NOT NULL constraints to be added as NOT VALID
- a379061a22a8 18.0 landed
-
Add missing deparsing of [NO] IDENT to XMLSERIALIZE()
- 984410b92326 18.0 cited
-
backend launchers void * arguments for binary data
- 7202d72787d3 18.0 cited
-
Add pg_constraint rows for not-null constraints
- 14e87ffa5c54 18.0 cited
-
Create the infrastructure for planner support functions.
- 1fb57af92069 12.0 cited
-
Add prokind column, replacing proisagg and proiswindow
- fd1a421fe661 11.0 cited