From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposed patch: make SQL interval-literal syntax work per spec |
Date: | 2008-09-12 20:55:10 |
Message-ID: | 48CAD72E.90406@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> The reason it's not SQL-standard is the data value isn't.
> So not a problem. Someone conforming to the spec limits on
> what he puts in will see spec-compliant output. I think all
> you need is 'yyy-mm dd hh:mm:ss' where you omit yyy-mm if
> zeroes, omit dd if zero, omit hh:mm:ss if zeroes (but maybe
> only if dd is also 0? otherwise your output is just dd which
> is uncomfortably ambiguous).
Great. That's what I'll do.
Any convention or preference on the naming of the GUC?
I assume "intervalstyle" is reasonable?
Or thoughts regarding the current EncodeInterval() that's
already using the "datestyle" GUC?
pg82=# select interval '1';
interval
----------
00:00:01
(1 row)
pg82=# set datestyle='sql';
SET
pg82=# select interval '1';
interval
----------
@ 1 sec
(1 row)
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Mayer | 2008-09-12 21:04:38 | Re: Proposed patch: make SQL interval-literal syntax work per spec |
Previous Message | Tom Lane | 2008-09-12 20:40:02 | Re: Proposed patch: make SQL interval-literal syntax work per spec |