Re: cataloguing NOT NULL constraints
От | Peter Eisentraut |
---|---|
Тема | Re: cataloguing NOT NULL constraints |
Дата | |
Msg-id | bac841ed-b86d-e3c2-030d-02a3db067307@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: cataloguing NOT NULL constraints (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: cataloguing NOT NULL constraints
|
Список | pgsql-hackers |
On 09.09.22 19:58, Alvaro Herrera wrote: > There were a lot more problems in that submission than I at first > realized, and I had to rewrite a lot of code in order to fix them. I > have fixed all the user-visible problems I found in this version, and > reviewed the tests results more carefully so I am now more confident > that behaviourally it's doing the right thing; but Reading through the SQL standard again, I think this patch goes a bit too far in folding NOT NULL and CHECK constraints together. The spec says that you need to remember whether a column was defined as NOT NULL, and that the commands DROP NOT NULL and SET NOT NULL only affect constraints defined in that way. In this implementation, a constraint defined as NOT NULL is converted to a CHECK (x IS NOT NULL) constraint and the original definition is forgotten. Besides that, I think that users are not going to like that pg_dump rewrites their NOT NULL constraints into CHECK table constraints. I suspect that this needs a separate contype for NOT NULL constraints that is separate from CONSTRAINT_CHECK.
В списке pgsql-hackers по дате отправления: