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 14393DA291 for ; Thu, 6 Oct 2005 15:16:49 -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 75979-06 for ; Thu, 6 Oct 2005 18:16:40 +0000 (GMT) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by svr1.postgresql.org (Postfix) with ESMTP id B240FDA40D for ; Thu, 6 Oct 2005 15:16:39 -0300 (ADT) Received: from dilbert (H245.C18.B96.tor.eicat.ca [66.96.18.245]) by ox.eicat.ca (Postfix) with SMTP id B0F42F629; Thu, 6 Oct 2005 14:16:26 -0400 (EDT) Date: Thu, 6 Oct 2005 14:16:27 -0400 From: "D'Arcy J.M. Cain" To: Joshua Kramer Cc: pgsql-sql@postgresql.org Subject: Re: DATESTYLE and 0000-00-00 Message-Id: <20051006141627.6acdd2c1.darcy@druid.net> In-Reply-To: References: X-Mailer: Sylpheed version 2.0.1 (GTK+ 2.6.10; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/60 X-Sequence-Number: 22913 On Thu, 6 Oct 2005 09:01:22 -0400 (EDT) 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? It is invalid. There was no year 0. Perhaps what you want is NULL or, possibly, EPOCH if you are looking for a sentinel value. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.