From: Peter Eisentraut <e99re41@DoCS.UU.SE>
To: Seth Banks <seth@subimage.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] default for date/time types
Date: Mon, 6 Mar 2000 08:09:31 +0100 (MET)
Message-ID: <Pine.GSO.4.02A.10003060806200.17581-100000@Svan.DoCS.UU.SE> (raw)
In-Reply-To: <NOEPJACOBMIOEOLHKIODOEKJCBAA.seth@subimage.com>
On Sun, 5 Mar 2000, Seth Banks wrote:
> if i were to setup a date or time type in my database, what would be a
> good default value to use (an empty one, but not null)
The way you're asking you probably do want to use NULL because there's no
such thing as an "empty date". NULL is supposed to fill exactly that gap.
However, if for some reason you really can't use NULL then consider
perhaps 'invalid' or '-infinity' but these are distinctly non-portable and
might not buy you much in terms of elegance. Implementor beware. :)
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: e99re41@DoCS.UU.SE, seth@subimage.com
Subject: Re: [SQL] default for date/time types
In-Reply-To: <Pine.GSO.4.02A.10003060806200.17581-100000@Svan.DoCS.UU.SE>
References: <NOEPJACOBMIOEOLHKIODOEKJCBAA.seth@subimage.com> <Pine.GSO.4.02A.10003060806200.17581-100000@Svan.DoCS.UU.SE>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox