Date or Documentation bug?

Started by Mitterwald, Holgeralmost 26 years ago2 messagesbugs
Jump to latest
#1Mitterwald, Holger
mittehlg@coi.de

Good evening,
I am not shure if I discovered a Date or a Documentation bug....
The Manpage says if postgres is started with the option "-e" it
uses european date-style in the format "dd-mm-yyyy". But this only takes
effekt if I select datestyle=Postgres instead of the default "ISO".
With Datestyle=ISO it is always "yyyy-mm-dd", no matter if I choose US
or
European style.
With this behavior the postgres option "-e" does rather make any sense
to me.

Greetings,
Holger
P.S.: Is there a way to change the Datestyle to Postgres without a
SQL-Statement,
e.g. ENV-Variable or config-file?

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Mitterwald, Holger (#1)
Re: Date or Documentation bug?

Mitterwald, Holger writes:

I am not shure if I discovered a Date or a Documentation bug.... The
Manpage says if postgres is started with the option "-e" it uses
european date-style in the format "dd-mm-yyyy". But this only takes
effekt if I select datestyle=Postgres instead of the default "ISO".
With Datestyle=ISO it is always "yyyy-mm-dd", no matter if I choose US
or European style. With this behavior the postgres option "-e" does
rather make any sense to me.

The documentation is kind of unclear at that point. The
European/NonEuropean option (-e) controls

1) Whether the month is before the day or vice versa in the 'SQL' and
'Postgres' styles.

2) How ambiguous date input (e.g., 01/02/99) is to be interpreted
regarding month before day.

It does not affect the output of the ISO format, since the ISO format is
fixed.

P.S.: Is there a way to change the Datestyle to Postgres without a
SQL-Statement, e.g. ENV-Variable or config-file?

PGDATESTYLE environment variable. Config file I'm working on.

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden