Skip site navigation (1) Skip section navigation (2)

Patch for ISO-8601-Interval Input and output.

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To:
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Patch for ISO-8601-Interval Input and output.
Date: 2008-10-02 10:31:40
Message-ID: 48E4A30C.3000503@cheapcomplexdevices.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Ron Mayer wrote:
> Tom Lane wrote:
>> In fact, given that we are now
>> somewhat SQL-compliant on interval input, a GUC that selected
>> PG traditional, SQL-standard, or ISO 8601 interval output format seems
>> like it could be a good idea.

This patch (that works on top of the IntervalStyle patch I
posted earlier today) adds support for ISO8601 standard[0]
"Time Interval" "Durations" of the "format with designators"
(section 4.4.4.2.1).   The other ISO 8601 types of intervals
deal with start and end points, so this one seemed most relevant.

It builds on a patch I had earlier submitted back in 2003[1],
where people noted that we wanted sql-standard intervals
first; but I see that ISO 8601 intervals did make it to the
todo list.

I updated the docs, but I still need to add regression tests,
so it's still a WIP, but I think the code's ready (I've been
using an older version of this patch internally since '03) so
I'd appreciate feedback.

[0] http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=doc.Fetch&nodeid=4021199
[1] http://archives.postgresql.org/pgsql-patches/2003-09/msg00121.php
[2] http://wiki.postgresql.org/wiki/Todo



Attachment: iso8601intervals.patch
Description: text/x-diff (14.3 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Reg Me PleaseDate: 2008-10-02 10:31:47
Subject: Re: Transactions within a function body
Previous:From: Heikki LinnakangasDate: 2008-10-02 10:27:14
Subject: Re: trivial patch for pg_freespacemap documentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group