pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix handling of "undef" in contrib/jsonb_plperl.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix handling of "undef" in contrib/jsonb_plperl.
@ 2019-08-04 18:05  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-08-04 18:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of "undef" in contrib/jsonb_plperl.

Perl has multiple internal representations of "undef", and just
testing for SvTYPE(x) == SVt_NULL doesn't recognize all of them,
leading to "cannot transform this Perl type to jsonb" errors.
Use the approved test SvOK() instead.

Report and patch by Ivan Panchenko.  Back-patch to v11 where
this module was added.

Discussion: https://postgr.es/m/1564783533.324795401@f193.i.mail.ru

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e8b639357f0a9d9543578ac9331a8b33dcc4f25f

Modified Files
--------------
contrib/jsonb_plperl/expected/jsonb_plperl.out  | 22 +++++++++++++++++++++-
contrib/jsonb_plperl/expected/jsonb_plperlu.out | 22 +++++++++++++++++++++-
contrib/jsonb_plperl/jsonb_plperl.c             | 10 +++++-----
contrib/jsonb_plperl/sql/jsonb_plperl.sql       | 13 +++++++++++++
contrib/jsonb_plperl/sql/jsonb_plperlu.sql      | 13 +++++++++++++
5 files changed, 73 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix handling of "undef" in contrib/jsonb_plperl.
@ 2019-08-04 18:05  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-08-04 18:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of "undef" in contrib/jsonb_plperl.

Perl has multiple internal representations of "undef", and just
testing for SvTYPE(x) == SVt_NULL doesn't recognize all of them,
leading to "cannot transform this Perl type to jsonb" errors.
Use the approved test SvOK() instead.

Report and patch by Ivan Panchenko.  Back-patch to v11 where
this module was added.

Discussion: https://postgr.es/m/1564783533.324795401@f193.i.mail.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e0f5048851ff88a53630a0c121a1cd15f6a2f1cd

Modified Files
--------------
contrib/jsonb_plperl/expected/jsonb_plperl.out  | 22 +++++++++++++++++++++-
contrib/jsonb_plperl/expected/jsonb_plperlu.out | 22 +++++++++++++++++++++-
contrib/jsonb_plperl/jsonb_plperl.c             | 10 +++++-----
contrib/jsonb_plperl/sql/jsonb_plperl.sql       | 13 +++++++++++++
contrib/jsonb_plperl/sql/jsonb_plperlu.sql      | 13 +++++++++++++
5 files changed, 73 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix handling of "undef" in contrib/jsonb_plperl.
@ 2019-08-04 18:05  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-08-04 18:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix handling of "undef" in contrib/jsonb_plperl.

Perl has multiple internal representations of "undef", and just
testing for SvTYPE(x) == SVt_NULL doesn't recognize all of them,
leading to "cannot transform this Perl type to jsonb" errors.
Use the approved test SvOK() instead.

Report and patch by Ivan Panchenko.  Back-patch to v11 where
this module was added.

Discussion: https://postgr.es/m/1564783533.324795401@f193.i.mail.ru

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/df521ab79547b82471126e54e9dc7fead4a5a4fb

Modified Files
--------------
contrib/jsonb_plperl/expected/jsonb_plperl.out  | 22 +++++++++++++++++++++-
contrib/jsonb_plperl/expected/jsonb_plperlu.out | 22 +++++++++++++++++++++-
contrib/jsonb_plperl/jsonb_plperl.c             | 10 +++++-----
contrib/jsonb_plperl/sql/jsonb_plperl.sql       | 13 +++++++++++++
contrib/jsonb_plperl/sql/jsonb_plperlu.sql      | 13 +++++++++++++
5 files changed, 73 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-08-04 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-04 18:05 pgsql: Fix handling of "undef" in contrib/jsonb_plperl. Tom Lane <tgl@sss.pgh.pa.us>
2019-08-04 18:05 pgsql: Fix handling of "undef" in contrib/jsonb_plperl. Tom Lane <tgl@sss.pgh.pa.us>
2019-08-04 18:05 pgsql: Fix handling of "undef" in contrib/jsonb_plperl. Tom Lane <tgl@sss.pgh.pa.us>

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