Re: [PATCH] Leading minus for negative time interval in ISO 8601

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Leading minus for negative time interval in ISO 8601
Дата
Msg-id 1189720.1591238786@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PATCH] Leading minus for negative time interval in ISO 8601  (Mikhail Titov <mlt@gmx.us>)
Ответы Re: [PATCH] Leading minus for negative time interval in ISO 8601  (Chapman Flack <chap@anastigmatix.net>)
Re: [PATCH] Leading minus for negative time interval in ISO 8601  (Mikhail Titov <mlt@gmx.us>)
Список pgsql-hackers
Mikhail Titov <mlt@gmx.us> writes:
> I'd like to propose a simple patch to allow for negative ISO 8601
> intervals with leading minus, e.g. -PT1H besides PT-1H. It seems that
> standard isn't quite clear on negative duration.

"Isn't quite clear"?  ISTM that if the standard intended to allow that,
it'd be pretty clear.  I looked through the 8601 spec just now, and
I can't see any indication whatever that they intend to allow "-" before P.
It's hard to see why they'd bother with that introducer at all if
data can appear before it.

> However, lots of
> software use leading minus and expect/generate intervals in such forms
> making those incompatible with current PostgreSQL decoding code.

Which "lots of software" are you speaking of, exactly?  interval_in
has never had such a capability, and I don't recall previous complaints
about it.

The difference between a useful standard and a useless one is the
extent to which people obey the standard rather than adding random
extensions to it, so I'm not inclined to add such an extension
without a very well-grounded argument for it.

            regards, tom lane



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel copy
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: libpq copy error handling busted