Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
Дата
Msg-id 18856.1525185476@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
I wrote:
> I googled a bit and found these recommendations on stackoverflow:
> my $inf    = 9**9**9;
> my $neginf = -9**9**9;
> my $nan    = -sin(9**9**9);
> These do seem to produce the desired results, at least on the
> couple of Perl versions I checked, including 5.8.3.

Nope, buildfarm shows that still doesn't work everywhere.

If we had a transform function that converted SQL float8 directly
to Perl NV, we could use that to produce NVs containing inf/nan.
But that would be a pretty ridiculous amount of test scaffolding
to create to test what, in the end, is two lines of very
straightforward and unlikely-to-break code.

My recommendation is just to drop these test cases.  Getting them
to work on all old Perl versions is more trouble than they're worth.

            regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Document that subscription tests require hstore
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgsql: Indexes with INCLUDE columns and their support in B-tree