forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2a10fdc
committed
Eliminate cache lookup errors in SQL functions for object addresses
When using the following functions, users could see various types oferrors of the type "cache lookup failed for OID XXX" with elog(), thatcan only be used for internal errors:* pg_describe_object()* pg_identify_object()* pg_identify_object_as_address()The set of APIs managing object addresses for all object types are madesmarter by gaining a new argument "missing_ok" that allows any caller tocontrol if an error is raised or not on an undefined object. The SQLfunctions listed above are changed to handle the case where an object ismissing.Regression tests are added for all object types for the cases wherethese are undefined. Before this commit, these cases failed with cachelookup errors, and now they basically return NULL (minus the name of theobject type requested).Author: Michael PaquierReviewed-by: Aleksander Alekseev, Dmitry Dolgov, Daniel Gustafsson,Álvaro Herrera, Kyotaro HoriguchiDiscussion:https://postgr.es/m/CAB7nPqSZxrSmdHK-rny7z8mi=EAFXJ5J-0RbzDw6aus=wB5azQ@mail.gmail.com1 parent689696c commit2a10fdc
File tree
19 files changed
+996
-332
lines changed- contrib/sepgsql
- doc/src/sgml
- src
- backend
- catalog
- commands
- utils/adt
- include
- catalog
- utils
- test/regress
- expected
- sql
19 files changed
+996
-332
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 |
| - | |
| 172 | + | |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
196 |
| - | |
| 196 | + | |
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
259 |
| - | |
| 259 | + | |
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
355 | 355 |
| |
356 | 356 |
| |
357 | 357 |
| |
358 |
| - | |
| 358 | + | |
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
| |||
523 | 523 |
| |
524 | 524 |
| |
525 | 525 |
| |
526 |
| - | |
| 526 | + | |
527 | 527 |
| |
528 | 528 |
| |
529 | 529 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
| 83 | + | |
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
| |||
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
117 |
| - | |
| 117 | + | |
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 |
| - | |
| 167 | + | |
168 | 168 |
| |
169 | 169 |
| |
170 | 170 |
| |
| |||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
| |||
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
207 |
| - | |
| 207 | + | |
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
| |||
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 |
| - | |
| 295 | + | |
296 | 296 |
| |
297 | 297 |
| |
298 | 298 |
| |
| |||
324 | 324 |
| |
325 | 325 |
| |
326 | 326 |
| |
327 |
| - | |
| 327 | + | |
328 | 328 |
| |
329 | 329 |
| |
330 | 330 |
| |
|
Lines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
105 |
| - | |
| 105 | + | |
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
149 |
| - | |
| 149 | + | |
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
| 181 | + | |
182 | 182 |
| |
183 | 183 |
| |
184 | 184 |
| |
| |||
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
| 225 | + | |
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 |
| - | |
| 291 | + | |
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
| |||
450 | 450 |
| |
451 | 451 |
| |
452 | 452 |
| |
453 |
| - | |
| 453 | + | |
454 | 454 |
| |
455 | 455 |
| |
456 | 456 |
| |
| |||
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
475 |
| - | |
| 475 | + | |
476 | 476 |
| |
477 | 477 |
| |
478 | 478 |
| |
| |||
503 | 503 |
| |
504 | 504 |
| |
505 | 505 |
| |
506 |
| - | |
| 506 | + | |
507 | 507 |
| |
508 | 508 |
| |
509 | 509 |
| |
| |||
584 | 584 |
| |
585 | 585 |
| |
586 | 586 |
| |
587 |
| - | |
| 587 | + | |
588 | 588 |
| |
589 | 589 |
| |
590 | 590 |
| |
| |||
695 | 695 |
| |
696 | 696 |
| |
697 | 697 |
| |
698 |
| - | |
| 698 | + | |
699 | 699 |
| |
700 | 700 |
| |
701 | 701 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
| 126 | + | |
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
151 |
| - | |
| 151 | + | |
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
| 189 | + | |
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22826 | 22826 |
| |
22827 | 22827 |
| |
22828 | 22828 |
| |
22829 |
| - | |
| 22829 | + | |
| 22830 | + | |
22830 | 22831 |
| |
22831 | 22832 |
| |
22832 | 22833 |
| |
| |||
22858 | 22859 |
| |
22859 | 22860 |
| |
22860 | 22861 |
| |
22861 |
| - | |
| 22862 | + | |
| 22863 | + | |
22862 | 22864 |
| |
22863 | 22865 |
| |
22864 | 22866 |
| |
| |||
22915 | 22917 |
| |
22916 | 22918 |
| |
22917 | 22919 |
| |
| 22920 | + | |
22918 | 22921 |
| |
22919 | 22922 |
| |
22920 | 22923 |
| |
|
Lines changed: 16 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
743 | 743 |
| |
744 | 744 |
| |
745 | 745 |
| |
746 |
| - | |
747 |
| - | |
| 746 | + | |
| 747 | + | |
748 | 748 |
| |
749 | 749 |
| |
750 | 750 |
| |
| |||
790 | 790 |
| |
791 | 791 |
| |
792 | 792 |
| |
793 |
| - | |
| 793 | + | |
794 | 794 |
| |
795 | 795 |
| |
796 | 796 |
| |
797 |
| - | |
| 797 | + | |
798 | 798 |
| |
799 | 799 |
| |
800 | 800 |
| |
| |||
812 | 812 |
| |
813 | 813 |
| |
814 | 814 |
| |
815 |
| - | |
| 815 | + | |
816 | 816 |
| |
817 |
| - | |
| 817 | + | |
818 | 818 |
| |
819 | 819 |
| |
820 | 820 |
| |
821 | 821 |
| |
822 |
| - | |
| 822 | + | |
823 | 823 |
| |
824 | 824 |
| |
825 | 825 |
| |
| |||
929 | 929 |
| |
930 | 930 |
| |
931 | 931 |
| |
932 |
| - | |
| 932 | + | |
933 | 933 |
| |
934 | 934 |
| |
935 | 935 |
| |
936 | 936 |
| |
937 |
| - | |
| 937 | + | |
938 | 938 |
| |
939 | 939 |
| |
940 | 940 |
| |
| |||
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 | 1054 |
| |
1055 |
| - | |
| 1055 | + | |
| 1056 | + | |
1056 | 1057 |
| |
1057 | 1058 |
| |
1058 | 1059 |
| |
1059 | 1060 |
| |
1060 |
| - | |
| 1061 | + | |
1061 | 1062 |
| |
1062 | 1063 |
| |
1063 | 1064 |
| |
| |||
1105 | 1106 |
| |
1106 | 1107 |
| |
1107 | 1108 |
| |
1108 |
| - | |
| 1109 | + | |
1109 | 1110 |
| |
1110 | 1111 |
| |
1111 | 1112 |
| |
| |||
1129 | 1130 |
| |
1130 | 1131 |
| |
1131 | 1132 |
| |
1132 |
| - | |
| 1133 | + | |
| 1134 | + | |
1133 | 1135 |
| |
1134 | 1136 |
| |
1135 | 1137 |
| |
| |||
1187 | 1189 |
| |
1188 | 1190 |
| |
1189 | 1191 |
| |
1190 |
| - | |
| 1192 | + | |
1191 | 1193 |
| |
1192 | 1194 |
| |
1193 | 1195 |
| |
|
0 commit comments
Comments
(0)