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

From: Miles Keaton <mileskeaton(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: when to use NULL and when to NOT NULL DEFAULT ''
Date: 2004-10-08 05:22:06
Message-ID: 59b2d39b04100722222aba715d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PG peeps:

What's the prevailing wisdom & best-practice advice about when to let
a varchar (or any) column be NULL, and when to make it NOT NULL
DEFAULT '' (or '0000-00-00' or whatever) - in PostgreSQL?

{Moving to PG from MySQL where we were always advised to use NOT NULL
to save a byte or something. But that was years ago so sorry for the
stupid-sounding question, but I had to ask.}

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brian Morton 2004-10-08 06:19:15 Re: interfaces for python
Previous Message Michael Fuhr 2004-10-08 05:17:29 Re: Question from a newbie