forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit85ec8bc
committed
In hstore_plpython, avoid crashing when return value isn't a mapping.
Python 3 changed the behavior of PyMapping_Check(), breaking thetest in plpython_to_hstore() that verifies whether a function resultto be transformed is acceptable. A backwards-compatible fix is tofirst verify that the object doesn't pass PySequence_Check().Perhaps accidentally, our other uses of PyMapping_Check() alreadyfollow uses of PySequence_Check(), so that no other bugs werecreated by this change.Per bug #17908 from Alexander Lakhin. Back-patch to all supportedbranches.Dmitry Dolgov and Tom LaneDiscussion:https://postgr.es/m/17908-3f19a125d56a11d6@postgresql.org1 parent1ed1b84 commit85ec8bc
File tree
3 files changed
+29
-1
lines changed- contrib/hstore_plpython
- expected
- sql
3 files changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
0 commit comments
Comments
(0)