Seen with current sources and with 6.4.2:

When datestyle = 'Postgres,European', the datetime parser will accept
dates written in either US or Euro order:

regression=> set datestyle = 'Postgres,European';
SET VARIABLE
regression=> select 'Wed 06 Jan 16:10:00 1999 EST'::datetime;
?column?
----------------------------
Wed 06 Jan 16:10:00 1999 EST
(1 row)

regression=> select 'Wed Jan 06 16:10:00 1999 EST'::datetime;
?column?
----------------------------
Wed 06 Jan 16:10:00 1999 EST
(1 row)

But when datestyle = 'Postgres,US' it won't:

regression=> set datestyle = 'Postgres,US';
SET VARIABLE
regression=> select 'Wed Jan 06 16:10:00 1999 EST'::datetime;
?column?
----------------------------
Wed Jan 06 16:10:00 1999 EST
(1 row)
regression=> select 'Wed 06 Jan 16:10:00 1999 EST'::datetime;
ERROR:  Bad datetime external representation 'Wed 06 Jan 16:10:00 1999 EST'

A bug, no??

			regards, tom lane

Mon, 08 Feb 1999 20:34:52 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Datetime input-parsing shortcoming
> Seen with current sources and with 6.4.2:
> When datestyle = 'Postgres,European', the datetime parser will accept
> dates written in either US or Euro order:
> But when datestyle = 'Postgres,US' it won't:
> regression=> select 'Wed 06 Jan 16:10:00 1999 EST'::datetime;
> ERROR:  Bad datetime external representation
> A bug, no??

Si, though I would prefer to think of it as a "feature omission" since
it would have accepted a date sometimes (if the day of month was greater
than 12) :)

postgres=> show DateStyle;
NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
postgres=> select 'Wed 06 Jan 16:10:00 1999 EST'::datetime;
----------------------------
Wed Jan 06 21:10:00 1999 GMT
(1 row)

Will apply to the development tree soon...

                    - Tom
Tue, 09 Feb 1999 15:06:49 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Datetime input-parsing shortcoming