Re: Transform for pl/perl - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Transform for pl/perl
Date
Msg-id 599707b8-ca3d-2c0f-cd23-3464d30c7624@2ndquadrant.com
Whole thread Raw
In response to Re: Transform for pl/perl  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4/29/18 14:28, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> On 4/24/18 14:31, Andrew Dunstan wrote:
>>> There is the routine IsValidJsonNumber that helps - see among others
>>> hstore_io.c for an example use.
> 
>> I would need something like that taking a double/float8 input.  But I
>> think there is no such shortcut available, so I just wrote out the tests
>> for isinf and isnan explicitly.  Attached patch should fix it.
>> jsonb_plpython will need a similar fix.
> 
> I looked this over, it looks fine to me.  I first questioned the use
> of ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE for rejecting NaN, but I see
> that we are doing that in lots of comparable places (e.g., dtoi4())
> so I'm on board with it.

Yeah, that was the idea.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: BufFileSize() doesn't work on a "shared" BufFiles
Next
From: Peter Eisentraut
Date:
Subject: Re: Transform for pl/perl