postgresql/contrib/hstore_plpython
Tom Lane c74f88c406 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
2023-04-27 11:55:06 -04:00
..
expected In hstore_plpython, avoid crashing when return value isn't a mapping. 2023-04-27 11:55:06 -04:00
sql In hstore_plpython, avoid crashing when return value isn't a mapping. 2023-04-27 11:55:06 -04:00
.gitignore Add transforms feature 2015-04-26 10:33:14 -04:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
hstore_plpython.c In hstore_plpython, avoid crashing when return value isn't a mapping. 2023-04-27 11:55:06 -04:00
hstore_plpython2u--1.0.sql Convert contrib/hstore_plpython to not use direct linking to other modules. 2016-10-03 22:27:11 -04:00
hstore_plpython2u.control Add transforms feature 2015-04-26 10:33:14 -04:00
hstore_plpython3u--1.0.sql Convert contrib/hstore_plpython to not use direct linking to other modules. 2016-10-03 22:27:11 -04:00
hstore_plpython3u.control Add transforms feature 2015-04-26 10:33:14 -04:00
hstore_plpythonu--1.0.sql Convert contrib/hstore_plpython to not use direct linking to other modules. 2016-10-03 22:27:11 -04:00
hstore_plpythonu.control Add transforms feature 2015-04-26 10:33:14 -04:00