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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposed patch: make SQL interval-literal syntax work per spec
Дата
Msg-id 27939.1221279300@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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
Список pgsql-hackers
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:
> Cool.  I think I have it pretty much working with a new
> GUC "intervalstyle" that can take values of

> "sql_standard" that I think will output SQL standard
>                 interval literals when given a sql
>                 standard interval.

> "iso_8601" that will output ISO 8601 "Time Intervals" of
>             the "format with time-unit deignators", and

> "backward_compatible" that will output the same thing
>             that postgres currently does that depends
>             on the value of the DateStyle GUC.

Actually, we have never considered that new releases need to preserve
the behavior of postgresql.conf settings.  So the above seems
unnecessarily baroque.  How about decoupling interval_out's behavior
from DateStyle altogether, and instead providing values of IntervalStyle
that match all the previous behaviors?

> Should those ECPG functions be made identical to
> the ones in the backend?

The ECPG situation is a mess :-(.  That code was forked off from the
backend some time ago, and has not been well maintained at all.  If you
are brave enough to tackle that mess, more power to you; but I strongly
suggest doing it as an independent patch.

> Could those somehow share code with the backend for
> some of their work?

The palloc and elog dependencies seem to be the hard part.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Upcoming back-branch update releases
Следующее
От: Decibel!
Дата:
Сообщение: Re: New FSM allocation policy