Tom Lane wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I am not sure about some of the corner cases --- anyone want to see if
>>> their understanding of the spec for <interval string> is different?
>
>> The patch seems to support extensions to the standard.
>
> Right. All of these were extensions that already existed in PG.
Back a while ago (2003) there was some talk about replacing
some of the non-standard extensions with shorthand forms of
intervals with ISO 8601 intervals that have a similar but
not-the-same shorthand. Interval ISO Postgres 8601
shorthand ----------------------------------------------------- '1 year 1 minute' 'P1YT1M' '1Y1M'
'1year 1 month' 'P1Y1M' N/A
http://archives.postgresql.org/pgsql-patches/2003-09/msg00119.php
When I proposed we support the ISO-8601 standard shorthand,
Tom recommended we rip out the old shorthand at the same time:
http://archives.postgresql.org/pgsql-patches/2003-09/msg00134.php
I've been maintaining a patch that supports these ISO-8601
intervals for a client. Back in 2003 I recall Peter said
he wanted to see SQL standard intervals first. There were
also discussions about selecting the output format. My old
patch made this depend on datestyle; but it seems Tom preferred
a separate GUC?
http://archives.postgresql.org/pgsql-patches/2003-12/msg00257.php
I see there's a TODO regarding ISO8601 intervals as well.
I have a version of this patch for 8.2; but would be happy
to bring it up-to-date if people want to re-consider it now.