Re: Transform for pl/perl

From: Anthony Bykov <a(dot)bykov(at)postgrespro(dot)ru>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Transform for pl/perl
Date: 2018-01-12 08:47:39
Message-ID: 20180112114739.6a9f0d4c@anthony-24-g082ur
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 12 Jan 2018 15:19:26 +1300
Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> wrote:

> On Thu, Dec 7, 2017 at 10:56 PM, Anthony Bykov
> <a(dot)bykov(at)postgrespro(dot)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 Content-Type Size
0001-jsonb_plperl-extension-v6.patch text/x-patch 29.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2018-01-12 09:02:59 Re: CREATE ROUTINE MAPPING
Previous Message Marina Polyakova 2018-01-12 08:37:12 Re: master make check fails on Solaris 10