aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-04-27 11:55:06 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-04-27 11:55:06 -0400
commitce9662598ddac1883d921d47a3fde63859f077ed (patch)
tree38e4e414b71e3f2a045c69fd3ad3d6fa656972f8 /src
parentcba3c8f6dd7fffb63eac2f31d98bd23816959d04 (diff)
downloadpostgresql-ce9662598ddac1883d921d47a3fde63859f077ed.tar.gz
postgresql-ce9662598ddac1883d921d47a3fde63859f077ed.zip
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
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions