Re: Patch for ISO-8601-Interval Input and output.
От | Tom Lane |
---|---|
Тема | Re: Patch for ISO-8601-Interval Input and output. |
Дата | |
Msg-id | 751.1226365097@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Patch for ISO-8601-Interval Input and output. (R Mayer <pg_cert@cheapcomplexdevices.com>) |
Ответы |
Interval code refactoring patch (Was: Re: Patch for ISO-8601-Interval
Input and output.)
|
Список | pgsql-hackers |
R Mayer <pg_cert@cheapcomplexdevices.com> writes: > Applied and pushed to the website http://0ape.com/postgres_interval_patches/ I ran into an interesting failure case: regression=# select interval 'P-1Y-2M3DT-4H-5M-6'; interval -------------------P-1Y-2M3DT-10H-5M (1 row) 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. I think the problem is that the code will accept a value as being alternative format even when it's already read some format-with-designator fields. I propose adding a flag to remember that we've seen a field in the current part (date or time) and rejecting an apparent alternative-format input if the flag is set. regards, tom lane
В списке pgsql-hackers по дате отправления: