DateStyle (was Re: Per-database/schema settings) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject DateStyle (was Re: Per-database/schema settings)
Date
Msg-id Pine.LNX.4.21.0007061921350.4191-100000@localhost.localdomain
Whole thread Raw
In response to Re: Per-database/schema settings  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Responses Re: DateStyle (was Re: Per-database/schema settings)
List pgsql-hackers
Thomas Lockhart writes:

> I've been pretty resistant to having a fully-tailorable native output
> capability, since it would be possible to generate date strings which
> can not be correctly interpreted on input.

Good point. Let them use to_char().

> "German" doesn't have much meaning with a flipped month/day field.

The only DateStyle "major mode" that cares about the month/day is
"SQL". German, Postgres, and ISO are not affected, AFAICT.

> We could vote quickly to get rid of it and hope that those Germans
> aren't paying attention ;)

Well, I'm German, but ... :-)

No, I'm not proposing to get rid of this, at least not right now. All I'm
saying is that there should perhaps be two separate settings:

1. Major output mode

2. Should month-before-day or day-before-month be *preferred* where
*applicable*? (It's not "applicable" in any output mode but SQL, and it's
not "applicable" on input like '99/12/31'. -- I always thought of it as
"tie-breaker".)


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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL & the BSD License
Next
From: JanWieck@t-online.de (Jan Wieck)
Date:
Subject: Re: update on TOAST status'