forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdf38157
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 parent376dc82 commitdf38157
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 | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 |
| - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 |
| |
132 | 138 |
| |
133 | 139 |
| |
|
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)