Re: Date input changed in 7.4 ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mendola Gaetano" <mendola(at)bigfoot(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Date input changed in 7.4 ?
Date: 2003-08-26 15:48:35
Message-ID: 26390.1061912915@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Mendola Gaetano" <mendola(at)bigfoot(dot)com> writes:
> I noticed that some date are not anymore accepted:
> test=# select '18/03/71'::date;
> ERROR: invalid input syntax for date: "18/03/71"
> is this the indendeed behaviour ?

If it does not match your DateStyle setting, then yes.

regression=# select '18/03/71'::date;
ERROR: invalid input syntax for date: "18/03/71"
regression=# show DateStyle ;
DateStyle
-----------
ISO, MDY
(1 row)

regression=# set datestyle = dmy;
SET
regression=# select '18/03/71'::date;
date
------------
1971-03-18
(1 row)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mendola Gaetano 2003-08-26 15:53:25 Re: Date input changed in 7.4 ?
Previous Message Bruce Momjian 2003-08-26 15:44:09 Re: Date input changed in 7.4 ?