Brendan Jurd wrote:
On Fri, Nov 7, 2008 at 3:35 AM, Ron Mayer <[EMAIL PROTECTED]> wrote:
I think I updated the web site and git now, and
'P0000-00-01' is now accepted.   It might be useful if
someone double checked my reading of the spec, tho.

I've tested out your latest revision and read the spec more closely,
and pretty much everything works as expected. ...
I agree with your interpretation of the spec, it clearly says that 'T'
can be omitted when there are no time components. ...
The examples in Annex B confirm this.

Cool.  Thanks.

I did run into one potential bug:
postgres=# select interval 'P0001';
 ...
Whereas, I expected to get '1 year', since the format allows you to
omit lower-order components from right-to-left:
P0001-01-01 => 1 year 1 month 1 day
P0001-01 => 1 year 1 month
P0001 => should be 1 year?

Indeed, that's right.   Thanks for catching another one.
I just checked in (to my git) a patch that I believe fixes it.

regression=# select interval 'P0001',interval 'P00010000',interval 'PT01';
 interval | interval | interval
----------+----------+----------
 1 year   | 1 year   | 01:00:00
(1 row)

On the documentation front, I have a few final cleanups to suggest
(patch attached).
 * After giving the spec a closer look, I thought that 4.4.3.2 and
4.4.3.3 were the proper spec references to use for the two formats.

Hmmm... Certainly what I had in datatype.sgml was wrong, but I'm
now thinking 5.5.4.2.1 and 5.5.4.2.2 would be the most clear?

Totally agree with the rest of your docs changes and applied those.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to