pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: In hstore_plpython, avoid crashing when return value isn't a map
6+ messages / 1 participants
[nested] [flat]

* pgsql: In hstore_plpython, avoid crashing when return value isn't a map
@ 2023-04-27 15:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-04-27 15:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In hstore_plpython, avoid crashing when return value isn't a mapping.

Python 3 changed the behavior of PyMapping_Check(), breaking the
test in plpython_to_hstore() that verifies whether a function result
to be transformed is acceptable.  A backwards-compatible fix is to
first verify that the object doesn't pass PySequence_Check().

Perhaps accidentally, our other uses of PyMapping_Check() already
follow uses of PySequence_Check(), so that no other bugs were
created by this change.

Per bug #17908 from Alexander Lakhin.  Back-patch to all supported
branches.

Dmitry Dolgov and Tom Lane

Discussion: https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org

Branch
------
master

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

Modified Files
--------------
contrib/hstore_plpython/expected/hstore_plpython.out | 11 +++++++++++
contrib/hstore_plpython/hstore_plpython.c            |  8 +++++++-
contrib/hstore_plpython/sql/hstore_plpython.sql      | 11 +++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)



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

* pgsql: In hstore_plpython, avoid crashing when return value isn't a map
@ 2023-04-27 15:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-04-27 15:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In hstore_plpython, avoid crashing when return value isn't a mapping.

Python 3 changed the behavior of PyMapping_Check(), breaking the
test in plpython_to_hstore() that verifies whether a function result
to be transformed is acceptable.  A backwards-compatible fix is to
first verify that the object doesn't pass PySequence_Check().

Perhaps accidentally, our other uses of PyMapping_Check() already
follow uses of PySequence_Check(), so that no other bugs were
created by this change.

Per bug #17908 from Alexander Lakhin.  Back-patch to all supported
branches.

Dmitry Dolgov and Tom Lane

Discussion: https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/85ec8bcce2608b8e29a1a0742282d39b29b78dda

Modified Files
--------------
contrib/hstore_plpython/expected/hstore_plpython.out | 11 +++++++++++
contrib/hstore_plpython/hstore_plpython.c            |  8 +++++++-
contrib/hstore_plpython/sql/hstore_plpython.sql      | 11 +++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)



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

* pgsql: In hstore_plpython, avoid crashing when return value isn't a map
@ 2023-04-27 15:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-04-27 15:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In hstore_plpython, avoid crashing when return value isn't a mapping.

Python 3 changed the behavior of PyMapping_Check(), breaking the
test in plpython_to_hstore() that verifies whether a function result
to be transformed is acceptable.  A backwards-compatible fix is to
first verify that the object doesn't pass PySequence_Check().

Perhaps accidentally, our other uses of PyMapping_Check() already
follow uses of PySequence_Check(), so that no other bugs were
created by this change.

Per bug #17908 from Alexander Lakhin.  Back-patch to all supported
branches.

Dmitry Dolgov and Tom Lane

Discussion: https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org

Branch
------
REL_14_STABLE

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

Modified Files
--------------
contrib/hstore_plpython/expected/hstore_plpython.out | 11 +++++++++++
contrib/hstore_plpython/hstore_plpython.c            |  8 +++++++-
contrib/hstore_plpython/sql/hstore_plpython.sql      | 11 +++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)



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

* pgsql: In hstore_plpython, avoid crashing when return value isn't a map
@ 2023-04-27 15:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-04-27 15:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In hstore_plpython, avoid crashing when return value isn't a mapping.

Python 3 changed the behavior of PyMapping_Check(), breaking the
test in plpython_to_hstore() that verifies whether a function result
to be transformed is acceptable.  A backwards-compatible fix is to
first verify that the object doesn't pass PySequence_Check().

Perhaps accidentally, our other uses of PyMapping_Check() already
follow uses of PySequence_Check(), so that no other bugs were
created by this change.

Per bug #17908 from Alexander Lakhin.  Back-patch to all supported
branches.

Dmitry Dolgov and Tom Lane

Discussion: https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org

Branch
------
REL_13_STABLE

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

Modified Files
--------------
contrib/hstore_plpython/expected/hstore_plpython.out | 11 +++++++++++
contrib/hstore_plpython/hstore_plpython.c            |  8 +++++++-
contrib/hstore_plpython/sql/hstore_plpython.sql      | 11 +++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)



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

* pgsql: In hstore_plpython, avoid crashing when return value isn't a map
@ 2023-04-27 15:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-04-27 15:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In hstore_plpython, avoid crashing when return value isn't a mapping.

Python 3 changed the behavior of PyMapping_Check(), breaking the
test in plpython_to_hstore() that verifies whether a function result
to be transformed is acceptable.  A backwards-compatible fix is to
first verify that the object doesn't pass PySequence_Check().

Perhaps accidentally, our other uses of PyMapping_Check() already
follow uses of PySequence_Check(), so that no other bugs were
created by this change.

Per bug #17908 from Alexander Lakhin.  Back-patch to all supported
branches.

Dmitry Dolgov and Tom Lane

Discussion: https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org

Branch
------
REL_12_STABLE

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

Modified Files
--------------
contrib/hstore_plpython/expected/hstore_plpython.out | 11 +++++++++++
contrib/hstore_plpython/hstore_plpython.c            |  8 +++++++-
contrib/hstore_plpython/sql/hstore_plpython.sql      | 11 +++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)



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

* pgsql: In hstore_plpython, avoid crashing when return value isn't a map
@ 2023-04-27 15:55 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2023-04-27 15:55 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In hstore_plpython, avoid crashing when return value isn't a mapping.

Python 3 changed the behavior of PyMapping_Check(), breaking the
test in plpython_to_hstore() that verifies whether a function result
to be transformed is acceptable.  A backwards-compatible fix is to
first verify that the object doesn't pass PySequence_Check().

Perhaps accidentally, our other uses of PyMapping_Check() already
follow uses of PySequence_Check(), so that no other bugs were
created by this change.

Per bug #17908 from Alexander Lakhin.  Back-patch to all supported
branches.

Dmitry Dolgov and Tom Lane

Discussion: https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org

Branch
------
REL_11_STABLE

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

Modified Files
--------------
contrib/hstore_plpython/expected/hstore_plpython.out | 11 +++++++++++
contrib/hstore_plpython/hstore_plpython.c            |  8 +++++++-
contrib/hstore_plpython/sql/hstore_plpython.sql      | 11 +++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)



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


end of thread, other threads:[~2023-04-27 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-04-27 15:55 pgsql: In hstore_plpython, avoid crashing when return value isn't a map Tom Lane <tgl@sss.pgh.pa.us>
2023-04-27 15:55 pgsql: In hstore_plpython, avoid crashing when return value isn't a map Tom Lane <tgl@sss.pgh.pa.us>
2023-04-27 15:55 pgsql: In hstore_plpython, avoid crashing when return value isn't a map Tom Lane <tgl@sss.pgh.pa.us>
2023-04-27 15:55 pgsql: In hstore_plpython, avoid crashing when return value isn't a map Tom Lane <tgl@sss.pgh.pa.us>
2023-04-27 15:55 pgsql: In hstore_plpython, avoid crashing when return value isn't a map Tom Lane <tgl@sss.pgh.pa.us>
2023-04-27 15:55 pgsql: In hstore_plpython, avoid crashing when return value isn't a map 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