Render infinite date/timestamps as 'infinity' for json/jsonb

Andrew Dunstan <andrew@dunslane.net>

Commit: bda76c1c8cfb1d11751ba6be88f0242850481733
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2015-02-26T17:25:21Z
Releases: 9.5.0
Render infinite date/timestamps as 'infinity' for json/jsonb

Commit ab14a73a6c raised an error in these cases and later the
behaviour was copied to jsonb. This is what the XML code, which we
then adopted, does, as the XSD types don't accept infinite values.
However, json dates and timestamps are just strings as far as json is
concerned, so there is no reason not to render these values as
'infinity'.

The json portion of this is backpatched to 9.4 where the behaviour was
introduced. The jsonb portion only affects the development branch.

Per gripe on pgsql-general.

Files