forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit33f5bf9
committed
ALTER TABLE OWNER must change the ownership of the table's rowtype too.
This was not especially critical before, but it is now that we trackownership dependencies --- the dependency for the rowtype *must* shiftto the new owner. Spotted by Bernd Helmle.Also fix a problem introduced by recent change to allow non-superusersto do ALTER OWNER in some cases: if the table had a toast table, ALTEROWNER failed *even for superusers*, because the test being applied wouldconclude that the new would-be owner had no create rights on pg_toast.A side-effect of the fix is to disallow changing the ownership of indexesor toast tables separately from their parent table, which seems a goodidea on the whole.1 parente48b28b commit33f5bf9
File tree
6 files changed
+104
-34
lines changed- doc/src/sgml/ref
- src
- backend/commands
- include/commands
- test/regress
- expected
- sql
6 files changed
+104
-34
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
238 |
| - | |
| 238 | + | |
239 | 239 |
| |
240 | 240 |
| |
241 | 241 |
| |
|
Lines changed: 48 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
241 |
| - | |
| 241 | + | |
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
| |||
2141 | 2141 |
| |
2142 | 2142 |
| |
2143 | 2143 |
| |
2144 |
| - | |
| 2144 | + | |
| 2145 | + | |
2145 | 2146 |
| |
2146 | 2147 |
| |
2147 | 2148 |
| |
| |||
5238 | 5239 |
| |
5239 | 5240 |
| |
5240 | 5241 |
| |
| 5242 | + | |
| 5243 | + | |
| 5244 | + | |
| 5245 | + | |
| 5246 | + | |
| 5247 | + | |
5241 | 5248 |
| |
5242 | 5249 |
| |
5243 |
| - | |
| 5250 | + | |
5244 | 5251 |
| |
5245 | 5252 |
| |
5246 | 5253 |
| |
| |||
5267 | 5274 |
| |
5268 | 5275 |
| |
5269 | 5276 |
| |
5270 |
| - | |
5271 | 5277 |
| |
5272 | 5278 |
| |
5273 |
| - | |
5274 | 5279 |
| |
5275 | 5280 |
| |
| 5281 | + | |
| 5282 | + | |
| 5283 | + | |
| 5284 | + | |
| 5285 | + | |
5276 | 5286 |
| |
5277 | 5287 |
| |
5278 | 5288 |
| |
5279 |
| - | |
| 5289 | + | |
5280 | 5290 |
| |
5281 | 5291 |
| |
5282 | 5292 |
| |
| |||
5293 | 5303 |
| |
5294 | 5304 |
| |
5295 | 5305 |
| |
5296 |
| - | |
5297 |
| - | |
5298 |
| - | |
5299 |
| - | |
5300 |
| - | |
5301 |
| - | |
5302 |
| - | |
5303 | 5306 |
| |
5304 |
| - | |
5305 |
| - | |
5306 |
| - | |
5307 |
| - | |
5308 |
| - | |
5309 |
| - | |
5310 |
| - | |
5311 |
| - | |
5312 |
| - | |
| 5307 | + | |
| 5308 | + | |
| 5309 | + | |
| 5310 | + | |
| 5311 | + | |
| 5312 | + | |
| 5313 | + | |
| 5314 | + | |
| 5315 | + | |
| 5316 | + | |
| 5317 | + | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
| 5321 | + | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
| 5325 | + | |
| 5326 | + | |
| 5327 | + | |
5313 | 5328 |
| |
5314 | 5329 |
| |
5315 | 5330 |
| |
| |||
5342 | 5357 |
| |
5343 | 5358 |
| |
5344 | 5359 |
| |
| 5360 | + | |
| 5361 | + | |
| 5362 | + | |
| 5363 | + | |
| 5364 | + | |
| 5365 | + | |
5345 | 5366 |
| |
5346 | 5367 |
| |
5347 | 5368 |
| |
| |||
5358 | 5379 |
| |
5359 | 5380 |
| |
5360 | 5381 |
| |
5361 |
| - | |
| 5382 | + | |
5362 | 5383 |
| |
5363 | 5384 |
| |
5364 | 5385 |
| |
| |||
5367 | 5388 |
| |
5368 | 5389 |
| |
5369 | 5390 |
| |
5370 |
| - | |
| 5391 | + | |
| 5392 | + | |
5371 | 5393 |
| |
5372 | 5394 |
| |
5373 | 5395 |
| |
| |||
5437 | 5459 |
| |
5438 | 5460 |
| |
5439 | 5461 |
| |
5440 |
| - | |
| 5462 | + | |
5441 | 5463 |
| |
5442 | 5464 |
| |
5443 | 5465 |
| |
|
Lines changed: 42 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
2057 | 2057 |
| |
2058 | 2058 |
| |
2059 | 2059 |
| |
2060 |
| - | |
| 2060 | + | |
| 2061 | + | |
2061 | 2062 |
| |
2062 | 2063 |
| |
2063 | 2064 |
| |
| |||
2102 | 2103 |
| |
2103 | 2104 |
| |
2104 | 2105 |
| |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
2105 | 2145 |
| |
2106 | 2146 |
| |
2107 | 2147 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 |
| |
10 | 12 |
| |
11 | 13 |
| |
| |||
30 | 32 |
| |
31 | 33 |
| |
32 | 34 |
| |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 |
| |
34 | 39 |
| |
35 | 40 |
| |
36 |
| - | |
37 | 41 |
| |
38 | 42 |
| |
39 | 43 |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 |
| |
37 | 40 |
| |
38 | 41 |
| |
|
0 commit comments
Comments
(0)