forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcc53123
committed
Tweak pg_partition_tree for undefined relations and unsupported relkinds
This fixes a crash which happened when calling the function directlywith a relation OID referring to a non-existing object, and changes thebehavior so as NULL is returned for unsupported relkinds instead ofgenerating an error. This puts the new function in line with many othersystem functions, and eases actions like full scans of pg_class.Author: Michael PaquierReviewed-by: Amit Langote, Stephen FrostDiscussion:https://postgr.es/m/20181207010406.GO2407@paquier.xyz1 parent7a28e9a commitcc53123
File tree
3 files changed
+23
-7
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+23
-7
lines changedLines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
| |||
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
45 |
| - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 |
| |
47 | 51 |
| |
48 | 52 |
| |
49 | 53 |
| |
50 | 54 |
| |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
| 55 | + | |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
|
Lines changed: 16 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 |
| |
10 | 16 |
| |
11 | 17 |
| |
| |||
107 | 113 |
| |
108 | 114 |
| |
109 | 115 |
| |
110 |
| - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
111 | 121 |
| |
112 |
| - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
113 | 127 |
| |
114 | 128 |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
|
0 commit comments
Comments
(0)