forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite6e50ad
committed
Don't crash if cursor_to_xmlschema is used on a non-data-returning Portal.
cursor_to_xmlschema() assumed that any Portal must have a tupDesc,which is not so. Add a defensive check.It's plausible that this mistake occurred because of the ratherpoorly chosen name of the lookup function SPI_cursor_find(),which in such cases is returning something that isn't very muchlike a cursor. Add some documentation to try to forestall futureerrors of the same ilk.Report and patch by Boyu Yang (docs changes by me). Back-patchto all supported branches.Discussion:https://postgr.es/m/dd343010-c637-434c-a8cb-418f53bda3b8.yangboyu.yby@alibaba-inc.com1 parentc5b7f79 commite6e50ad
2 files changed
+17
-0
lines changedLines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2092 | 2092 |
| |
2093 | 2093 |
| |
2094 | 2094 |
| |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
2095 | 2108 |
| |
2096 | 2109 |
| |
2097 | 2110 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2762 | 2762 |
| |
2763 | 2763 |
| |
2764 | 2764 |
| |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
2765 | 2769 |
| |
2766 | 2770 |
| |
2767 | 2771 |
| |
|
0 commit comments
Comments
(0)