On 20 May 2012 01:52, Daniel Farina <dan...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers