Re: cataloguing NOT NULL constraints

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: cataloguing NOT NULL constraints
Дата
Msg-id 502CD49F02000025000497A7@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: cataloguing NOT NULL constraints  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> I think that a NOT NULL constraint attached to a column with a
> composite type is equivalent to a CHECK (col IS DISTINCT FROM
> NULL); at least they seem to behave identically.  Is that what you
> would expect?
I had not thought about that, but now that you point it out I think
that interpretation makes more sense than any other.  In a quick
test they behaved identically for me.
> This seems a bit complicated to handle with the way I'm doing
> things today; at parse analysis time, when my current code is
> creating the check constraint, we don't know anything about the
> type of the column IIRC.  Maybe I will have to delay creating the
> constraint until execution.
Why?  CHECK (col IS DISTINCT FROM NULL) works correctly for *any*
type, doesn't it?
-Kevin



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: HeapTupleHeaderAdvanceLatestRemovedXid doing the wrong thing with multixacts
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: The pgrminclude problem