Re: Proposed patch: make SQL interval-literal syntax work per spec

Поиск
Список
Период
Сортировка
От Ron Mayer
Тема Re: Proposed patch: make SQL interval-literal syntax work per spec
Дата
Msg-id 48CC242A.9040704@cheapcomplexdevices.com
обсуждение исходный текст
Ответ на Re: Proposed patch: make SQL interval-literal syntax work per spec  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы 8.3 vs HEAD difference in Interval output?
8.3 vs HEAD difference in Interval output?
Список pgsql-hackers
Tom Lane wrote:
> Ron Mayer <rm_pg@cheapcomplexdevices.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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.3.3 compiler warnings with gcc 4.3
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: [Review] Tests citext casts by David Wheeler.