Re: External Open Standards

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: External Open Standards
Date: 2012-05-21 05:34:26
Message-ID: CADxJZo3URmn51j51GQq26+Guw3iVonXX=nUKU1fPpeAKqDrv+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 May 2012 01:52, Daniel Farina <daniel(at)heroku(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Farina 2012-05-21 05:42:31 Re: External Open Standards
Previous Message Joel Jacobson 2012-05-21 04:03:28 Re: Schema version management