Re: [HACKERS] Re: NULL & NOT NULL

Поиск
Список
Период
Сортировка
От Jose' Soares
Тема Re: [HACKERS] Re: NULL & NOT NULL
Дата
Msg-id 368A4355.9C3417AC@sferacarta.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: NULL & NOT NULL  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Thomas G. Lockhart wrote:
> 
> > This NULL clause is not part of constraints it is a default option and
> > we already support it,
> > prova=> CREATE TABLE table1 (field1 INTEGER DEFAULT NULL);
> > CREATE
> 
> That is certainly a clearer way of specifying it. Should we forget about
> the other syntax?
> 
>                        - Tom

Imho yes. The syntax CREATE TABLE table (field type NULL) has no sense
the NULL keyword may be used on a DEFAULT clause (if you want to specify
a default value)
or on a column constraint (if you want to avoid data integrity
violation).

1) Column Constraint definition:           [ CONSTRAINT name ] NOT NULL  
2) Default clause:           DEFAULT NULL

-Jose'-


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

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] problems recovering 6.1 db
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] NUMERIC needs OID's