Re: Inserts with incomplete rows... NOT NULL constraints

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Inserts with incomplete rows... NOT NULL constraints
Дата
Msg-id 200408111502.08030.peter_e@gmx.net
обсуждение исходный текст
Ответ на Inserts with incomplete rows... NOT NULL constraints  (Lars Erik Thorsplass <thorsplass@gmail.com>)
Список pgsql-sql
Am Mittwoch, 11. August 2004 14:35 schrieb Lars Erik Thorsplass:
> I would expect NULL fields not specified in the insert to get NULL
> inserted automatically. But that fields which are NOT NULL in the
> table structure gets inserted a NULL value too seems odd.

More accurately, the default value is inserted, which in turn is null if you 
didn't specify one.  You might find it odd that default values that are 
inconsistent with constraints are allowed, but I don't see any reasonable 
alternative.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


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

Предыдущее
От: Lars Erik Thorsplass
Дата:
Сообщение: Inserts with incomplete rows... NOT NULL constraints
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Inserts with incomplete rows... NOT NULL constraints