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 16253.1221176367@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposed patch: make SQL interval-literal syntax work per spec  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Responses Re: Proposed patch: make SQL interval-literal syntax work per spec  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Re: Proposed patch: make SQL interval-literal syntax work per spec  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Re: Proposed patch: make SQL interval-literal syntax work per spec  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
List pgsql-hackers
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:
> Back a while ago (2003) there was some talk about replacing
> some of the non-standard extensions with shorthand forms of
> intervals with ISO 8601 intervals that have a similar but
> not-the-same shorthand.

I think *replacement* would be a hard sell, as that would tick off all
the existing users ;-).  Now it seems like being able to accept either
the 8601 syntax or the existing syntaxes on input wouldn't be tough
at all, if you insist on the P prefix to distinguish; so that end of
it should be easy enough.  On the output side, seems like a GUC variable
is the standard precedent here.  I'd still vote against overloading
DateStyle --- it does too much already --- but a separate variable for
interval style wouldn't bother me.  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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: Commitfest patches mostly assigned ... status
Next
From: Ron Mayer
Date:
Subject: Re: Proposed patch: make SQL interval-literal syntax work per spec