Re: Catalog domain not-null constraints
| От | Tom Lane |
|---|---|
| Тема | Re: Catalog domain not-null constraints |
| Дата | |
| Msg-id | 2063822.1707687764@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Catalog domain not-null constraints (Peter Eisentraut <peter@eisentraut.org>) |
| Список | pgsql-hackers |
Peter Eisentraut <peter@eisentraut.org> writes:
> But I see that table constraints do not work that way. A command like
> ALTER TABLE t1 ADD NOT NULL c1 does nothing if the column already has a
> NOT NULL constraint. I'm not sure this is correct. At least it's not
> documented. We should probably make the domains feature work the same
> way, but I would like to understand why it works that way first.
That's probably a hangover from when the underlying state was just
a boolean (attnotnull). Still, I'm a little hesitant to change the
behavior. I do agree that named constraints need to "stack", so
that you'd have to remove each one before not-nullness stops being
enforced. Less sure about unnamed properties.
regards, tom lane
В списке pgsql-hackers по дате отправления: