Re: A creepy story about dates. How to prevent it?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: A creepy story about dates. How to prevent it?
Date: 2003-06-19 10:35:37
Message-ID: 20030619103537.GB10782@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 19, 2003 at 02:43:12 -0500,
Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> wrote:
>
> OTOH, Andrew Snow's method (alway use ANSI standard YYYY-MM-DD)
> is guaranteed to work. Have your app convert to that format before
> inserting, and then PostgreSQL is guaranteed to puke if there's
> a problem.

No it isn't. In 7.4:
area=> select '2003-20-02'::date;
date
------------
2003-02-20
(1 row)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-06-19 10:44:02 Re: explicit joins vs implicit joins
Previous Message Shridhar Daithankar 2003-06-19 10:01:52 Re: Incremental backups, and backup history