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

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
Cc: Miles Keaton <mileskeaton(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: when to use NULL and when to NOT NULL DEFAULT ''
Date: 2004-10-08 13:33:08
Message-ID: 975499A0-192E-11D9-A09B-000A95C88220@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Oct 8, 2004, at 10:19 PM, David Garamond wrote:

> Michael Glaesemann wrote:
>> In any case, one would never use NULL. Either the domain includes a
>> value for all possible values (including N/A) or you set up the db
>> schema appropriately.
>
> Hm, that can be painful. What if I have ten optional attributes;
> separate them to ten different tables?

Strictly? That's how I understand it. Whether or not it's performant
under PostgreSQLis another matter. :)

Michael Glaesemann
grzm myrealbox com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-10-08 13:52:00 Re: Question about timezones
Previous Message Stephan Szabo 2004-10-08 13:31:31 Re: text + text