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

From Anthony Bykov
Subject Re: Transform for pl/perl
Date
Msg-id 20180112114739.6a9f0d4c@anthony-24-g082ur
Whole thread Raw
In response to Re: Transform for pl/perl  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: Transform for pl/perl
Re: Transform for pl/perl
Re: Transform for pl/perl
List pgsql-hackers
On Fri, 12 Jan 2018 15:19:26 +1300
Thomas Munro <thomas.munro@enterprisedb.com> wrote:

> On Thu, Dec 7, 2017 at 10:56 PM, Anthony Bykov
> <a.bykov@postgrespro.ru> wrote:
> >> Please, find a new version of the patch in attachments to this
> >> message.  
> 
> Hi again Anthony,
> 
> I wonder why make check passes for me on my Mac, but when Travis CI
> (Ubuntu Trusty on amd64) runs it, it fails like this:
> 
> test jsonb_plperl             ... FAILED
> test jsonb_plperl_relocatability ... ok
> test jsonb_plperlu            ... FAILED
> test jsonb_plperlu_relocatability ... ok
> 
> ========= Contents of ./contrib/jsonb_plperl/regression.diffs
> *** /home/travis/build/postgresql-cfbot/postgresql/contrib/jsonb_plperl/expected/jsonb_plperl.out
> 2018-01-11 21:46:35.867584467 +0000
> --- /home/travis/build/postgresql-cfbot/postgresql/contrib/jsonb_plperl/results/jsonb_plperl.out
> 2018-01-11 21:55:08.564204175 +0000
> ***************
> *** 89,96 ****
>   (1 row)
> 
>   SELECT testSVToJsonb2('1E+131071');
> ! ERROR:  could not transform to type "jsonb"
> ! DETAIL:  The type you are trying to transform can't be transformed
> to jsonb CONTEXT:  PL/Perl function "testsvtojsonb2"
>   SELECT testSVToJsonb2('-1');
>    testsvtojsonb2
> --- 89,95 ----
>   (1 row)
> 
>   SELECT testSVToJsonb2('1E+131071');
> ! ERROR:  invalid input syntax for type numeric: "inf"
>   CONTEXT:  PL/Perl function "testsvtojsonb2"
>   SELECT testSVToJsonb2('-1');
>    testsvtojsonb2
> ======================================================================
> *** /home/travis/build/postgresql-cfbot/postgresql/contrib/jsonb_plperl/expected/jsonb_plperlu.out
> 2018-01-11 21:46:35.867584467 +0000
> --- /home/travis/build/postgresql-cfbot/postgresql/contrib/jsonb_plperl/results/jsonb_plperlu.out
> 2018-01-11 21:55:08.704204228 +0000
> ***************
> *** 89,96 ****
>   (1 row)
> 
>   SELECT testSVToJsonb2('1E+131071');
> ! ERROR:  could not transform to type "jsonb"
> ! DETAIL:  The type you are trying to transform can't be transformed
> to jsonb CONTEXT:  PL/Perl function "testsvtojsonb2"
>   SELECT testSVToJsonb2('-1');
>    testsvtojsonb2
> --- 89,95 ----
>   (1 row)
> 
>   SELECT testSVToJsonb2('1E+131071');
> ! ERROR:  invalid input syntax for type numeric: "inf"
>   CONTEXT:  PL/Perl function "testsvtojsonb2"
>   SELECT testSVToJsonb2('-1');
>    testsvtojsonb2
> ======================================================================
> 

Hello, thank you for your message.
The problem was that different perl compilers uses different infinity
representations. Some of them use "Inf" others - use "inf". So, in
attachments there is a new version of the patch.

Thank you again.

--
Anthony Bykov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: Marina Polyakova
Date:
Subject: Re: master make check fails on Solaris 10
Next
From: Ashutosh Bapat
Date:
Subject: Re: CREATE ROUTINE MAPPING