Received: from meryl.it.uu.se (root@meryl.it.uu.se [130.238.12.42]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA69470 for ; Mon, 6 Mar 2000 02:09:35 -0500 (EST) (envelope-from e99re41@DoCS.UU.SE) Received: from Svan.DoCS.UU.SE (e99re41@Svan.DoCS.UU.SE [130.238.9.160]) by meryl.it.uu.se (8.8.5/8.8.5) with ESMTP id IAA10026; Mon, 6 Mar 2000 08:09:32 +0100 (MET) Received: from localhost (e99re41@localhost) by Svan.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id IAA17694; Mon, 6 Mar 2000 08:09:31 +0100 X-Authentication-Warning: Svan.DoCS.UU.SE: e99re41 owned process doing -bs Date: Mon, 6 Mar 2000 08:09:31 +0100 (MET) From: Peter Eisentraut Reply-To: Peter Eisentraut To: Seth Banks cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] default for date/time types In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by hub.org id CAA69517 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