Re: A creepy story about dates. How to prevent it? - Mailing list pgsql-general

From scott.marlowe
Subject Re: A creepy story about dates. How to prevent it?
Date
Msg-id Pine.LNX.4.33.0306190807340.7044-100000@css120.ihs.com
Whole thread Raw
In response to Re: A creepy story about dates. How to prevent it?  (Andrew Snow <andrew@modulus.org>)
List pgsql-general
On Thu, 19 Jun 2003, Andrew Snow wrote:

>
> This is an old postgres "gotcha" that I've lived with since a long, long
> time ago.  It forced me to always use the datestyle YYYY-MM-DD so there
> is never any confusion in my programming.

create table p (d date);
CREATE TABLE
insert into p values ('2003-13-03');
INSERT 4530055 1
insert into p values ('2003-03-13');
INSERT 4530056 1
select * from p;
     d
------------
 2003-03-13
 2003-03-13

That doesn't fix it, it just makes it more obvious to the user how they
should insert.  If you switch the month/day pgsql STILL swaps them back
for you.




pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: attisdropped, * expansion and tg_trigtuple
Next
From: Ron Johnson
Date:
Subject: Re: A creepy story about dates. How to prevent it?