Re: when to use NULL and when to NOT NULL DEFAULT ''

Поиск
Список
Период
Сортировка
От David Garamond
Тема Re: when to use NULL and when to NOT NULL DEFAULT ''
Дата
Msg-id 41667563.6050208@zara.6.isreserved.com
обсуждение исходный текст
Ответ на Re: when to use NULL and when to NOT NULL DEFAULT ''  (Terry Lee Tucker <terry@esc1.com>)
Ответы Re: when to use NULL and when to NOT NULL DEFAULT ''  (Terry Lee Tucker <terry@esc1.com>)
Список pgsql-general
Btw, MySQL manual used to recommend (or still does?) defining all
columns as NOT NULL as much as possible, "because NULL is slow"... :-)

For me it's pretty obvious, if you are never going to allow the column
to have an "unknown value", then define it NOT NULL to let the database
guarantee that. Otherwise, nullable it is.



Terry Lee Tucker wrote:
> Why would you never define a column as NOT NULL, or am I misunderstanding what
> you are saying?
>
> On Friday 08 October 2004 06:07 am, Peter Eisentraut saith:
>
>>Briefly, you always do the first and never do the second.

--
dave


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

Предыдущее
От: David Garamond
Дата:
Сообщение: text + text
Следующее
От: David Garamond
Дата:
Сообщение: Re: when to use NULL and when to NOT NULL DEFAULT ''