pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: D'Arcy J.M. Cain <darcy@druid.net>
To: Joshua Kramer <josh@globalherald.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: DATESTYLE and 0000-00-00
Date: Thu, 6 Oct 2005 14:16:27 -0400
Message-ID: <20051006141627.6acdd2c1.darcy@druid.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0510060900120.11396@localhost.localdomain>
References: <Pine.LNX.4.63.0510060900120.11396@localhost.localdomain>

On Thu, 6 Oct 2005 09:01:22 -0400 (EDT)
Joshua Kramer <josh@globalherald.net> 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 <darcy@druid.net>         |  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.



view thread (4+ messages)  latest in thread

Message-ID: <20051006141627.6acdd2c1.darcy@druid.net>
Permalink:  ../20051006141627.6acdd2c1.darcy@druid.net/
Also on:    postgresql.org/message-id/20051006141627.6acdd2c1.darcy@druid.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: darcy@druid.net, josh@globalherald.net
  Subject: Re: DATESTYLE and 0000-00-00
  In-Reply-To: <20051006141627.6acdd2c1.darcy@druid.net>

* 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