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>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposed patch: make SQL interval-literal syntax work per spec |
Date: | 2008-09-13 20:35:54 |
Message-ID: | 48CC242A.9040704@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
>> interval ... "sql_standard"..."iso_8601"...
>> "backward_compatible" ...depends... on ... DateStyle...
>
> ...How about decoupling interval_out's behavior
> from DateStyle altogether, and instead providing values of IntervalStyle
> that match all the previous behaviors?
Great. That seems much more sane.
Any desired names for the existing interval styles?
Currently we output intervals in these two styles:
'1 year 2 mons 3 days 04:05:06'
when the DateStyle is iso.
and
'@ 1 year 2 mons 3 days 4 hours 5 mins 6 secs'
when the DateStyle is sql or postgres, etc.
I'm not quite sure where those styles came from so
don't know what good names for them might be.
>> Should those ECPG functions be made identical ...
> ...
> The palloc and elog dependencies seem to be the hard part.
Interesting. So EncodeDateTime and EncodeInterval, guessing 400 or
so lines, seem sharable since at first glance they either already do or
easily could make their callers deal with all allocation and logging.
Agreed that it's a independent patch that I'll try separately.
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2008-09-14 22:42:40 | Re: [Review] Tests citext casts by David Wheeler. |
Previous Message | Tom Lane | 2008-09-13 18:46:48 | Re: 8.3.3 compiler warnings with gcc 4.3 |