Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp
Date
Msg-id 75961.1445362084@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #13688: lack of return value in r_mark_regions()
Next
From: Tom Lane
Date:
Subject: Re: BUG #13688: lack of return value in r_mark_regions()