Обсуждение: ISO 8601 Intervals

Поиск
Список
Период
Сортировка

ISO 8601 Intervals

От
"Larry Rosenman"
Дата:
All,  I was thinking of handling the TODO for ISO8601 Interval output.
  Is  http://archives.postgresql.org/pgsql-patches/2003-09/msg00121.php
stillthe consensus?  I.E. rip out the current pseudo-iso code, and replace it
with genuine ISO8601 code?
  I tried(!) to e-mail Ron Mayer, but got a bounce :(

Thanks,
LER


-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 512-248-2683                 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3683 US



Re: ISO 8601 Intervals

От
Michael Glaesemann
Дата:
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.)

Michael Glaesemann
grzm myrealbox com





Re: ISO 8601 Intervals

От
"Larry Rosenman"
Дата:
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.)  

Yes.

LER


-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 512-248-2683                 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3683 US



Re: ISO 8601 Intervals

От
Ron Mayer
Дата:
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


Re: ISO 8601 Intervals

От
Ron Mayer
Дата:
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