forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9baabfa
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 parentae13f81 commit9baabfa
2 files changed
+17
-0
lines changedLines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2718 | 2718 |
| |
2719 | 2719 |
| |
2720 | 2720 |
| |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
2721 | 2734 |
| |
2722 | 2735 |
| |
2723 | 2736 |
| |
|
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)