I wrote:
> Petr Jelinek <petr@2ndquadrant.com> writes:
>> I think the json code does not need to have custom
>> handling of infinity but could just call the EncodeSpecialTimestamp() if
>> it was exported from the timestamp module.
> Meh. We'd have to change its API too, because it is expecting to print
> into a fixed buffer. I think probably easier to just duplicate the check.
But on second thought, that would have the json code knowing more about
timestamps than timestamp_out does, which seems like pretty bad design.
I'll change it as you suggest.
regards, tom lane