Re: ecmascript 5 DATESTYLE

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Ben Hockey <neonstalwart(at)gmail(dot)com>, Mike Fowler <mike(at)mlfowler(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ecmascript 5 DATESTYLE
Date: 2011-12-06 20:20:54
Message-ID: CAFj8pRBtrqNLa1ux4YzxkQNE1VJ0JKkZKk_uz+WW7w1FXaYXGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/12/6 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Dec 6, 2011 at 1:11 PM, Ben Hockey <neonstalwart(at)gmail(dot)com> wrote:
>>> i know its been over a year without any activity on this thread but did
>>> anything ever come of this?  i'd really like to be able to get dates to
>>> match the format specified for date time strings in ecmascript 5.  a generic
>>> way to specify the format would be ideal if it can be done securely.  has
>>> there been other threads discussing this more recently?
>
>> Not to my knowledge, though I don't read pgsql-general.  I think this
>> is the sort of thing that really only gets done if someone cares
>> enough about it to settle down and put together a detailed design
>> proposal, get consensus, and write a patch.  IOW, it's unlikely that
>> anyone else will do this for you, but you can certainly make a try at
>> doing it yourself, and get help from others along the way.
>
> TBH, I think that inventing a new datestyle setting "ECMA" would be a
> more appropriate investment of effort.  Generic format strings sound
> like a nightmare.  Maybe I've just been turned off by the
> to_date/to_char mess, but I'm very down on the idea of anything like
> that propagating into the main datetime I/O code.
>

I am for ECMA datestyle

it is there but just is not public, if I remember well

Theoretically some custom output/input transform routine can be very
interesting - for domains, for boolean type - but on second hand - the
usage of this feature is minimal and there is risk for less advanced
users - so ECMA datestyle is very adequate solution.

Regards

Pavel

>                        regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-12-06 20:25:11 Re: WIP: SP-GiST, Space-Partitioned GiST
Previous Message Tom Lane 2011-12-06 20:15:55 Re: ecmascript 5 DATESTYLE