Re: Transform for pl/perl

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Transform for pl/perl
Дата
Msg-id 10510.1525026483@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Transform for pl/perl  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: Transform for pl/perl  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
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.

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joe Wildish
Дата:
Сообщение: Re: Implementing SQL ASSERTION
Следующее
От: David Fetter
Дата:
Сообщение: Re: Implementing SQL ASSERTION