DateStyle (was Re: Per-database/schema settings)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: DateStyle (was Re: Per-database/schema settings)
Date: 2000-07-06 21:36:48
Message-ID: Pine.LNX.4.21.0007061921350.4191-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-06 21:43:05 Re: fcntl(F_SETLK)
Previous Message Peter Eisentraut 2000-07-06 21:36:41 Re: Lessons learned on how to build 7.0.2 on AIX 4.x