forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc74f88c
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 parentaeb6f4b commitc74f88c
File tree
3 files changed
+29
-1
lines changed- contrib/hstore_plpython
- expected
- sql
3 files changed
+29
-1
lines changedLines changed: 11 additions & 0 deletions
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 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
136 |
| - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
137 | 143 |
| |
138 | 144 |
| |
139 | 145 |
| |
|
Lines changed: 11 additions & 0 deletions
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)