Re: Proposed patch: make SQL interval-literal syntax work per spec - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposed patch: make SQL interval-literal syntax work per spec
Date
Msg-id 17129.1222142098@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposed patch: make SQL interval-literal syntax work per spec  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Proposed patch: make SQL interval-literal syntax work per spec
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Tom, which Interval TODO items did you complete with this patch?
>     http://wiki.postgresql.org/wiki/Todo#Dates_and_Times

I think we've at least mostly fixed

* Support ISO INTERVAL syntax if units cannot be determined from the string, and are supplied after the string

* Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH

There might be a few glitches left but they are at much smaller grain
than the TODO is talking about.


... while I'm looking: I am not sure that I think either of these TODO
items are sane or standards-compliant:

* Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS INTERVAL MONTH), and this should return '12 months'

* Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [patch] fix dblink security hole
Next
From: Tom Lane
Date:
Subject: Re: pg_type.h regression?