Re: External Open Standards

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: External Open Standards
Дата
Msg-id CADxJZo3URmn51j51GQq26+Guw3iVonXX=nUKU1fPpeAKqDrv+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: External Open Standards  (Daniel Farina <daniel@heroku.com>)
Ответы Re: External Open Standards  (Daniel Farina <daniel@heroku.com>)
Re: External Open Standards  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: External Open Standards  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 20 May 2012 01:52, Daniel Farina <daniel@heroku.com> wrote:
> The documentation is misleading to the point of our support for ISO
> 8601-strict parsing.
>
> http://archives.postgresql.org/pgsql-hackers/2012-02/msg01237.php
>
> A very fine point, but I discovered it not out of curiosity, but a
> fairly angry user on Twitter.
>
> We can define the problem away since the space-inclusive format is so
> common...so much so, that it is codified in RFC 3339
> (http://www.ietf.org/rfc/rfc3339.txt).  The only problem, then, is the
> DATESTYLE "ISO" labeling: changing that would be really painful, so
> perhaps another solution is to parse the "T" demanded by 8601,
> presuming no other details come to light.

We may be wandering a bit off-topic from Simon's OP, but I'll bite.
We already do *parse* the 'T' in datetime input:

postgres=# select timestamp '2012-05-21T15:05';     timestamp
---------------------2012-05-21 15:05:00
(1 row)

What we don't do is *output* the 'T', but this is pretty easy to
workaround, e.g., to_char(now(), 'YYYY-MM-DD"T"HH24:MI:SS').  The
scope of  actually wanting the 'T' is surely pretty minor?

I'd be okay with just adding a note in the manual under Date/Time
Output to the effect of "Note: ISO 8601 specifies the use of uppercase
letter 'T' to separate the date and time. Postgres uses a space for
improved readability, in line with other database systems and RFC
3339."

Cheers,
BJ


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joel Jacobson
Дата:
Сообщение: Re: Schema version management
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: External Open Standards