X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E5D53DA38F for ; Thu, 6 Oct 2005 15:38:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40597-04 for ; Thu, 6 Oct 2005 18:38:03 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 77608DA353 for ; Thu, 6 Oct 2005 15:38:00 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j96IbjCN076574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Oct 2005 12:37:48 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j96IbjDa017484; Thu, 6 Oct 2005 12:37:45 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j96Ibjnl017483; Thu, 6 Oct 2005 12:37:45 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 6 Oct 2005 12:37:45 -0600 From: Michael Fuhr To: Joshua Kramer Cc: pgsql-sql@postgresql.org Subject: Re: DATESTYLE and 0000-00-00 Message-ID: <20051006183745.GA17388@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/62 X-Sequence-Number: 22915 On Thu, Oct 06, 2005 at 09:01:22AM -0400, Joshua Kramer wrote: > I have my DATESTYLE set to ISO MDY. > > When I try to create a table with a default date of 0000-00-00, psql says > that this is an invalid date. Why, and can (or how can I) get it to > accept 0000-00-00 as a valid date? Why do you want to, considering that 0000-00-00 is *not* a valid date? Why not use NULL to represent an unknown value? -- Michael Fuhr