pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Create contrib/bool_plperl to provide a bool transform for PL/Pe
Date: Fri, 06 Mar 2020 22:11:44 +0000
Message-ID: <E1jALC4-0002JL-KC@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1jALC4-0002JL-KC@gemulon.postgresql.org>
Permalink:  ../E1jALC4-0002JL-KC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jALC4-0002JL-KC@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Create contrib/bool_plperl to provide a bool transform for PL/Pe
  In-Reply-To: <E1jALC4-0002JL-KC@gemulon.postgresql.org>
  References: <E1jALC4-0002JL-KC@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox