Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators" - Mailing list pgsql-patches

From Tom Lane
Subject Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators"
Date
Msg-id 28832.1063051160@sss.pgh.pa.us
Whole thread Raw
In response to Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators"  ("Ron Mayer" <ron@intervideo.com>)
Responses Re: ISO 8601 "Time Intervals" of the "format with time-unit
Re: ISO 8601 "Time Intervals" of the "format with time-unit deignators"
List pgsql-patches
"Ron Mayer" <ron@intervideo.com> writes:
> Tom wrote:
>> Er, don't we support that already?

> Postgresql supports a rather bizzare shorthand that has a similar
> syntax, but AFAICT, doesn't match ISO 8601 in any way that makes
> it practical.

Well, it's *supposed* to match ISO, AFAICT (the comments in the code
talk about "ISO dates").  Unless ISO has put out multiple specs that
cover this?

> Perhaps one could argue that the postgres shorthand should
> follow the ISO conventions, but I'd not want to break backward
> compatability, incase someone out there is using '1H30M' and
> expecting minutes instead of months.

I doubt anyone is using it, because it's completely undocumented.
If we're going to support the real ISO spec, I'd suggest ripping
out any not-quite-there variant.  (Especially so noting that your
code seems a lot cleaner than the ptype stuff.)

The datetime code is kind of a mess right now, because Thomas Lockhart
walked away from the project while only partway through some significant
additions.  He left some incomplete features and quite a number of bugs
in new-and-untested code.  We've been gradually cleaning up the problems,
but if if you find something that doesn't seem to make sense, it's
likely a bug rather than anything we want to preserve.  In particular,
given the knowledge that it doesn't meet the ISO spec, I'd judge that
the existing code for the ISO shorthand was a work-in-progress.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Ron Mayer"
Date:
Subject: Re: ISO 8601 'Time Intervals' of the 'format with time-unit deignators'
Next
From: Tom Lane
Date:
Subject: Re: ISO 8601 'Time Intervals' of the 'format with time-unit deignators'