Skip site navigation (1) Skip section navigation (2)

Re: Eurodates by default

From: Yury Bokhoncovich <byg(at)center-f1(dot)ru>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Eurodates by default
Date: 2002-03-20 09:02:55
Message-ID: Pine.LNX.4.33.0203201449590.12114-100000@panda.center-f1.ru (view raw or flat)
Thread:
Lists: pgsql-patches
Hello!

On Tue, 19 Mar 2002, Peter Eisentraut wrote:

> One issues was that the semantics of DateStyle don't fit well into GUC.
> DateStyle takes one or two strings and sets one or two integer variables.
> GUC basically only supports once argument setting one variable of equal
> type.  It can probably still be made to work with all the hooks that are
> in place, but it doesn't look pretty.
>
> I had once suggested splitting up DateStyle into two variables, one for
> the "style" and for the day/month order.  I think this is ultimately
> clearer to the user, too.

I think it's better to split "datestyle" (representation, separator, etc.,
there is many ways) and "eurodates" (order, de-facto european vs american
- I don't know about any other). The former fits well to string type, the
latter fits to boolean one.

>
> Others have suggested generalizing the "style" aspect to take a to_char
> format.  This comes with its own set of problems.

I don't like this: unclear and not easy.
Though there is a reason to do that 'cos it will be more similar to
Oracle (forget exact name of the env. variable fully controlling date
format).

-- 
WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
Phone: +7 (3832) 106228, ext.140, E-mail: byg(at)center-f1(dot)ru(dot)
Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.



In response to

pgsql-patches by date

Next:From: Yury BokhoncovichDate: 2002-03-20 12:33:12
Subject: useless statements in parse_datestyle_internal
Previous:From: Yury BokhoncovichDate: 2002-03-20 08:49:09
Subject: Re: Eurodates by default

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group