Re: ecmascript 5 DATESTYLE

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Ben Hockey <neonstalwart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ecmascript 5 DATESTYLE
Date: 2010-05-19 05:28:23
Message-ID: AANLkTinqs3DMSQOz0NDvDrfcoxDzlNzR_enc47KTMccf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/5/19 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Tue, May 18, 2010 at 6:26 PM, Ben Hockey <neonstalwart(at)gmail(dot)com> wrote:
>> hi,
>> i mistakenly had posted this to pgsql-bugs already and got a response (see
>> below - edited).  i'm posting here since afaik it is the way i should be
>> requesting new features.  my suggestion is to add a DATESTYLE format to
>> match the format specified for date time strings in ecmascript 5.
>> the following is from the ecmascript 5 specification
>> at http://www.ecmascript.org/docs/tc39-2009-043.pdf page 168:
>>
>> 15.9.1.15 Date Time String Format
>>
>> ECMAScript defines a string interchange format for date-times based upon a
>> simplification of the ISO 8601
>>
>> Extended Format.  The format is as follows: YYYY-MM-DDTHH:mm:ss.sssZ
>>
>> ecmascript 5 is the most recent specification for JavaScript and i would
>> think that having a DATESTYLE format to simplify interoperability with
>> JavaScript applications would be highly desirable.
>
> I don't object, if someone wants to write a patch.  I guess the
> question is whether to keep adding named formats, or try to create a
> general mechanism to allow the user to specify an arbitrary format, as
> we do with to_char().
>

I can write patch. I am against to general solution - It can be new
way for SQL injection.

Regards

Pavel

> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise Postgres Company
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-05-19 05:47:35 Re: Stefan's bug (was: max_standby_delay considered harmful)
Previous Message Robert Haas 2010-05-19 04:20:51 Re: ecmascript 5 DATESTYLE