pgsql: In hstore_plpython, avoid crashing when return value isn't a map
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: In hstore_plpython, avoid crashing when return value isn't a map |
| Дата | |
| Msg-id | E1ps3xs-005BeA-CF@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера