Interval code refactoring patch (Was: Re: Patch for ISO-8601-Interval Input and output.)

Поиск
Список
Период
Сортировка
От Ron Mayer
Тема Interval code refactoring patch (Was: Re: Patch for ISO-8601-Interval Input and output.)
Дата
Msg-id 49199280.3060904@cheapcomplexdevices.com
обсуждение исходный текст
Ответ на Re: Patch for ISO-8601-Interval Input and output.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> ...failure case ... interval 'P-1Y-2M3DT-4H-5M-6';
> This isn't the result I'd expect, and AFAICS the ISO spec does *not*
> allow any unit markers to be omitted in the format with designators.

Yes, this is true. I see you already made the change.

Tom Lane wrote:
> Applied with nontrivial revisions --- I fear I probably broke your third
> patch again :-(.

No problem. It wasn't hard to update.  Attached is an updated patch (as
well as being updated on my website; but since it applies to HEAD it's
as easy to get here).

The bulk of the changes are in regression tests where rounding of
fractional seconds was changed as discussed up-thread back in Sep.

Seems I should also submit one more patch that merge the newest
DecodeInterval, EncodeInterval and related functions into
/ecpg/pgtypeslib/interval.c?

And beyond that, there's still some eccentricities with the interval code
(why's "interval '1 year 1 year'" ok but "interval '1 second 1 second'" not)
but I don't know if I'd do more harm or good trying to look at those.


Вложения

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

Предыдущее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: [PATCHES] Solve a problem of LC_TIME of windows.
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: autovacuum and reloptions