forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4b96c03
committed
Make inherited TRUNCATE perform access permission checks on parent table only.
Previously, TRUNCATE command through a parent table checked thepermissions on not only the parent table but also the children tablesinherited from it. This was a bug and inherited queries should performaccess permission checks on the parent table only. This commit fixesthat bug.Back-patch to all supported branches.Author: Amit LangoteReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/CAHGQGwFHdSvifhJE+-GSNqUHSfbiKxaeQQ7HGcYz6SC2n_oDcg@mail.gmail.com1 parent603e03b commit4b96c03
File tree
3 files changed
+85
-19
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+85
-19
lines changedLines changed: 50 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
291 | 291 |
| |
292 | 292 |
| |
293 | 293 |
| |
294 |
| - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
295 | 297 |
| |
296 | 298 |
| |
297 | 299 |
| |
| |||
1242 | 1244 |
| |
1243 | 1245 |
| |
1244 | 1246 |
| |
1245 |
| - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1246 | 1252 |
| |
1247 | 1253 |
| |
1248 | 1254 |
| |
| |||
1278 | 1284 |
| |
1279 | 1285 |
| |
1280 | 1286 |
| |
1281 |
| - | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1282 | 1296 |
| |
1283 | 1297 |
| |
1284 | 1298 |
| |
| |||
1317 | 1331 |
| |
1318 | 1332 |
| |
1319 | 1333 |
| |
1320 |
| - | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1321 | 1337 |
| |
1322 | 1338 |
| |
1323 | 1339 |
| |
| |||
1530 | 1546 |
| |
1531 | 1547 |
| |
1532 | 1548 |
| |
1533 |
| - | |
| 1549 | + | |
1534 | 1550 |
| |
1535 |
| - | |
| 1551 | + | |
1536 | 1552 |
| |
1537 | 1553 |
| |
1538 | 1554 |
| |
1539 | 1555 |
| |
1540 | 1556 |
| |
1541 | 1557 |
| |
1542 |
| - | |
1543 |
| - | |
| 1558 | + | |
| 1559 | + | |
1544 | 1560 |
| |
1545 | 1561 |
| |
1546 |
| - | |
1547 |
| - | |
1548 |
| - | |
1549 |
| - | |
1550 |
| - | |
1551 |
| - | |
1552 |
| - | |
1553 |
| - | |
1554 |
| - | |
| 1562 | + | |
1555 | 1563 |
| |
1556 |
| - | |
| 1564 | + | |
1557 | 1565 |
| |
1558 | 1566 |
| |
1559 | 1567 |
| |
1560 |
| - | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
1561 | 1579 |
| |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
1562 | 1593 |
| |
1563 | 1594 |
| |
1564 | 1595 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
695 | 695 |
| |
696 | 696 |
| |
697 | 697 |
| |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
698 | 719 |
| |
699 | 720 |
| |
700 | 721 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
446 | 446 |
| |
447 | 447 |
| |
448 | 448 |
| |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
449 | 463 |
| |
450 | 464 |
| |
451 | 465 |
| |
|
0 commit comments
Comments
(0)