Re: when to use NULL and when to NOT NULL DEFAULT '' - Mailing list pgsql-general

From David Garamond
Subject Re: when to use NULL and when to NOT NULL DEFAULT ''
Date
Msg-id 41667563.6050208@zara.6.isreserved.com
Whole thread Raw
In response to Re: when to use NULL and when to NOT NULL DEFAULT ''  (Terry Lee Tucker <terry@esc1.com>)
Responses Re: when to use NULL and when to NOT NULL DEFAULT ''
List 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 by date:

Previous
From: David Garamond
Date:
Subject: text + text
Next
From: David Garamond
Date:
Subject: Re: when to use NULL and when to NOT NULL DEFAULT ''