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

From Terry Lee Tucker
Subject Re: when to use NULL and when to NOT NULL DEFAULT ''
Date
Msg-id 200410080714.33321.terry@esc1.com
Whole thread Raw
In response to Re: when to use NULL and when to NOT NULL DEFAULT ''  (David Garamond <lists@zara.6.isreserved.com>)
List pgsql-general
Understood. We use NOT NULL as you have stated below. I just wanted to make
sure we weren't doing something stupid. Thanks for the reply...

On Friday 08 October 2004 07:09 am, David Garamond saith:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

--
Quote: 78
"We have to keep in mind we are a nation under God, and if we ever
 forget that, we'll be just a nation under."

 --Ronald Reagan

 Work: 1-336-372-6812
 Cell: 1-336-363-4719
email: terry@esc1.com

pgsql-general by date:

Previous
From: David Garamond
Date:
Subject: Re: when to use NULL and when to NOT NULL DEFAULT ''
Next
From: Gaetano Mendola
Date:
Subject: Re: 8.0 questions