One more link...
this http://archives.postgresql.org/pgsql-patches/2003-12/msg00049.php
was the final draft of the patch I submitted, with docs patches, that
did not break backward computability (did not rip out the old syntax)
and supported both input and output of ISO-8601 compliant intervals
by setting the datestyle to "iso8601basic" as discussed in the thread
linked in the quoted article below.

It was applied http://archives.postgresql.org/pgsql-patches/2003-12/msg00253.php
and then debated 
http://archives.postgresql.org/pgsql-patches/2003-12/msg00202.php
and then unapplied 
http://archives.postgresql.org/pgsql-patches/2003-12/msg00030.php
on Peter Eisentraut's recommendation to implement SQL standard intervals first.



Ron Mayer wrote:
Larry Rosenman wrote:

Michael Glaesemann wrote:

On Jan 8, 2006, at 12:12 , Larry Rosenman wrote:

  I was thinking of handling the TODO for ISO8601 Interval output.


Just to be clear, you're talking about the ISO8601 duration syntax
(PnYnMnDTnHnMnS), correct? (The SQL standard made the unfortunate
choice to call durations, i.e., lengths of time, intervals.)


Back in 2003 I submitted such a patch [1,1b] that resulted in a fair
amount of discussion including some still (AFAIK) open issues
about the naming of the datestyle settings to control it [2,3,4].

There was also some discussion of the range off ISO 8601 durations
to support (ISO 8601 Basic Format, ISO  8601 Alternative Format,
and ISO 8601 Extended Format (which is more human-readable)) [5].

Finally, there is a similar, but different syntax currently supported
by postgresql (where '1Y1M' means 1 year 1 minute, while ISO 'P1Y1M'
would mean 1 year 1 month) and Tom recommended ripping that code
out[7] and at one point said my patch was looking cleaner than
the exiting code [8].  My patch does not yet rip that out.


I still use the patch myself, but don't have it updated to CVS tip.
I'd be happy to do so if people want that as a starting point.

   Ron


[1] http://archives.postgresql.org/pgsql-patches/2003-09/msg00103.php
[1b] http://archives.postgresql.org/pgsql-patches/2003-09/msg00286.php
[2] http://archives.postgresql.org/pgsql-patches/2003-09/msg00122.php
[3] http://archives.postgresql.org/pgsql-patches/2003-09/msg00129.php
[4] http://archives.postgresql.org/pgsql-patches/2003-09/msg00130.php
[5] http://archives.postgresql.org/pgsql-patches/2003-09/msg00133.php
[6] http://archives.postgresql.org/pgsql-patches/2003-09/msg00134.php
[7] http://archives.postgresql.org/pgsql-patches/2003-09/msg00134.php

[8] http://archives.postgresql.org/pgsql-patches/2003-09/msg00121.php

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to