Mikhail Titov <m...@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