[PATCH] Leading minus for negative time interval in ISO 8601 - Mailing list pgsql-hackers

From Mikhail Titov
Subject [PATCH] Leading minus for negative time interval in ISO 8601
Date
Msg-id 9q0367bkf9b.fsf@gmx.us
Whole thread Raw
Responses Re: [PATCH] Leading minus for negative time interval in ISO 8601  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello!

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. However, lots of
software use leading minus and expect/generate intervals in such forms
making those incompatible with current PostgreSQL decoding code.

All patch is doing is making a note of a leading minus and negates pg_tm
components along with fractional seconds. No other behavior change is
introduced.

--
Mikhail

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Atomic operations within spinlocks
Next
From: Thomas Munro
Date:
Subject: Re: Atomic operations within spinlocks