forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2bfe015
committed
Fix "unexpected relkind" error when denying permissions on toast tables.
get_relkind_objtype, and hence get_object_type, failed when applied to atoast table. This is not a good thing, because it prevents reporting ofperfectly legitimate permissions errors. (At present, these functionsare in fact *only* used to determine the ObjectType argument foracl_error() calls.) It seems best to have them fall back to returningOBJECT_TABLE in every case where they can't determine an object typefor a pg_class entry, so do that.In passing, make some edits to alter.c to make it more obvious thatthose calls of get_object_type() are used only for error reporting.This might save a few cycles in the non-error code path, too.Back-patch to v11 where this issue originated.John Hsu, Michael Paquier, Tom LaneDiscussion:https://postgr.es/m/C652D3DF-2B0C-4128-9420-FB5379F6B1E4@amazon.com1 parent3574c0a commit2bfe015
File tree
4 files changed
+42
-14
lines changed- src
- backend
- catalog
- commands
- test/regress
- expected
- sql
4 files changed
+42
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
2567 | 2574 | | |
2568 | 2575 | | |
2569 | 2576 | | |
| |||
5274 | 5281 | | |
5275 | 5282 | | |
5276 | 5283 | | |
| 5284 | + | |
| 5285 | + | |
| 5286 | + | |
| 5287 | + | |
| 5288 | + | |
| 5289 | + | |
| 5290 | + | |
| 5291 | + | |
| 5292 | + | |
| 5293 | + | |
5277 | 5294 | | |
5278 | 5295 | | |
5279 | 5296 | | |
| |||
5293 | 5310 | | |
5294 | 5311 | | |
5295 | 5312 | | |
5296 | | - | |
5297 | | - | |
5298 | | - | |
5299 | | - | |
5300 | | - | |
| 5313 | + | |
| 5314 | + | |
5301 | 5315 | | |
5302 | | - | |
5303 | | - | |
| 5316 | + | |
| 5317 | + | |
5304 | 5318 | | |
5305 | 5319 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
223 | 222 | | |
224 | 223 | | |
225 | 224 | | |
226 | | - | |
| 225 | + | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
667 | 666 | | |
668 | 667 | | |
669 | 668 | | |
| |||
719 | 718 | | |
720 | 719 | | |
721 | 720 | | |
722 | | - | |
| 721 | + | |
723 | 722 | | |
724 | 723 | | |
725 | 724 | | |
| |||
942 | 941 | | |
943 | 942 | | |
944 | 943 | | |
945 | | - | |
946 | | - | |
947 | 944 | | |
948 | 945 | | |
949 | 946 | | |
| |||
963 | 960 | | |
964 | 961 | | |
965 | 962 | | |
966 | | - | |
| 963 | + | |
| 964 | + | |
967 | 965 | | |
968 | 966 | | |
969 | 967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3134 | 3134 | | |
3135 | 3135 | | |
3136 | 3136 | | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
3137 | 3145 | | |
3138 | 3146 | | |
| 3147 | + | |
3139 | 3148 | | |
3140 | 3149 | | |
3141 | 3150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1129 | 1135 | | |
1130 | 1136 | | |
1131 | 1137 | | |
| 1138 | + | |
1132 | 1139 | | |
1133 | 1140 | | |
1134 | 1141 | | |
0 commit comments
Comments
(0)