Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id 335175.1663596532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: cataloguing NOT NULL constraints  (Isaac Morland <isaac.morland@gmail.com>)
Список pgsql-hackers
Isaac Morland <isaac.morland@gmail.com> writes:
> I thought I saw some discussion about the SQL standard saying that there is
> a difference between putting NOT NULL in a column definition, and CHECK
> (column_name NOT NULL). So if we're going to take this seriously, I think
> that means there needs to be a field in pg_constraint which identifies
> whether a constraint is a "real" one created explicitly as a constraint, or
> if it is just one created because a field is marked NOT NULL.

If we're going to go that way, I think that we should take the further
step of making not-null constraints be their own contype rather than
an artificially generated CHECK.  The bloat in pg_constraint from CHECK
expressions made this way seems like an additional reason not to like
doing it like that.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Tree-walker callbacks vs -Wdeprecated-non-prototype
Следующее
От: Matthias van de Meent
Дата:
Сообщение: Re: cataloguing NOT NULL constraints