Re: cataloguing NOT NULL constraints
От | Peter Eisentraut |
---|---|
Тема | Re: cataloguing NOT NULL constraints |
Дата | |
Msg-id | e254d0c9-d767-2420-9a9c-fd821b493acf@eisentraut.org обсуждение исходный текст |
Ответ на | Re: cataloguing NOT NULL constraints (Dean Rasheed <dean.a.rasheed@gmail.com>) |
Список | pgsql-hackers |
On 15.08.23 11:57, Dean Rasheed wrote: > Something else I noticed when reading the SQL standard is that a > user-defined CHECK (col IS NOT NULL) constraint should be recognised > by the system as also making the column not null (setting its > "nullability characteristic" to "known not nullable"). I think that's > more than just an artefact of how they say NOT NULL constraints should > be implemented, because the effect of such a CHECK constraint should > be exposed in the "columns" view of the information schema -- the > value of "is_nullable" should be "NO" if the column is "known not > nullable". Nullability determination is different from not-null constraints. The nullability characteristic of a column can be derived from multiple sources, including not-null constraints, check constraints, primary key constraints, domain constraints, as well as more complex rules in case of views, joins, etc. But this is all distinct and separate from the issue of not-null constraints that we are discussing here.
В списке pgsql-hackers по дате отправления: