Re: Transform for pl/perl

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Anthony Bykov <a.bykov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-01-28T21:57:11Z
Lists: pgsql-hackers
On Fri, Jan 12, 2018 at 9:47 PM, Anthony Bykov <a.bykov@postgrespro.ru> wrote:
> On Fri, 12 Jan 2018 15:19:26 +1300
> Thomas Munro <thomas.munro@enterprisedb.com> wrote:
> 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.

BTW PostgreSQL is written in C89 (though it uses some C99 library features if
present, just not language features), so you can't do this:

jsonb_plperl.c: In function ‘SV_ToJsonbValue’:
jsonb_plperl.c:238:6: error: ‘for’ loop initial declarations are only
allowed in C99 mode
      for (int i=0;str[i];i++)
      ^

-- 
Thomas Munro
http://www.enterprisedb.com


Commits

  1. Fix jsonb_plperl to convert Perl UV values correctly.

  2. Fix contrib/hstore_plperl to look through scalar refs.

  3. Allow plperl_sv_to_datum to look through scalar refs.

  4. Fix excessive enreferencing in jsonb-to-plperl transform.