pgsql: Create contrib/bool_plperl to provide a bool transform for PL/Pe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Create contrib/bool_plperl to provide a bool transform for PL/Pe
Date: 2020-03-06 22:11:44
Message-ID: E1jALC4-0002JL-KC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Create contrib/bool_plperl to provide a bool transform for PL/Perl[U].

plperl's default handling of bool arguments or results is not terribly
satisfactory, since Perl doesn't consider the string 'f' to be false.
Ideally we'd just fix that, but the backwards-compatibility hazard
would be substantial. Instead, build a TRANSFORM module that can
be optionally applied to provide saner semantics.

Perhaps usefully, this is also about the minimum possible skeletal
example of a plperl transform module; so it might be a better starting
point for user-written transform modules than hstore_plperl or
jsonb_plperl.

Ivan Panchenko

Discussion: https://postgr.es/m/1583013317.881182688@f390.i.mail.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/36058a3c55d2c42a513a53da8140b07cf0893afb

Modified Files
--------------
contrib/Makefile | 4 +-
contrib/bool_plperl/.gitignore | 4 ++
contrib/bool_plperl/Makefile | 39 +++++++++++
contrib/bool_plperl/bool_plperl--1.0.sql | 19 ++++++
contrib/bool_plperl/bool_plperl.c | 30 +++++++++
contrib/bool_plperl/bool_plperl.control | 7 ++
contrib/bool_plperl/bool_plperlu--1.0.sql | 19 ++++++
contrib/bool_plperl/bool_plperlu.control | 6 ++
contrib/bool_plperl/expected/bool_plperl.out | 97 +++++++++++++++++++++++++++
contrib/bool_plperl/expected/bool_plperlu.out | 97 +++++++++++++++++++++++++++
contrib/bool_plperl/sql/bool_plperl.sql | 66 ++++++++++++++++++
contrib/bool_plperl/sql/bool_plperlu.sql | 66 ++++++++++++++++++
doc/src/sgml/plperl.sgml | 47 ++++++++++++-
src/tools/msvc/Mkvcbuild.pm | 5 ++
14 files changed, 502 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2020-03-07 01:46:56 Re: pgsql: Revert "initdb: Change authentication defaults"
Previous Message Tom Lane 2020-03-06 19:17:56 pgsql: Allow Unicode escapes in any server encoding, not only UTF-8.