forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita5b652f
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 parent374464c commita5b652f
File tree
3 files changed
+86
-19
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+86
-19
lines changedLines changed: 51 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
300 | 300 |
| |
301 | 301 |
| |
302 | 302 |
| |
303 |
| - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
304 | 306 |
| |
305 | 307 |
| |
306 | 308 |
| |
| |||
1381 | 1383 |
| |
1382 | 1384 |
| |
1383 | 1385 |
| |
1384 |
| - | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1385 | 1391 |
| |
1386 | 1392 |
| |
1387 | 1393 |
| |
| |||
1420 | 1426 |
| |
1421 | 1427 |
| |
1422 | 1428 |
| |
1423 |
| - | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
1424 | 1438 |
| |
1425 | 1439 |
| |
1426 | 1440 |
| |
| |||
1503 | 1517 |
| |
1504 | 1518 |
| |
1505 | 1519 |
| |
1506 |
| - | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1507 | 1523 |
| |
1508 | 1524 |
| |
1509 | 1525 |
| |
| |||
1759 | 1775 |
| |
1760 | 1776 |
| |
1761 | 1777 |
| |
1762 |
| - | |
| 1778 | + | |
1763 | 1779 |
| |
1764 |
| - | |
| 1780 | + | |
1765 | 1781 |
| |
1766 | 1782 |
| |
1767 | 1783 |
| |
1768 | 1784 |
| |
1769 | 1785 |
| |
1770 | 1786 |
| |
1771 |
| - | |
1772 |
| - | |
| 1787 | + | |
| 1788 | + | |
1773 | 1789 |
| |
1774 | 1790 |
| |
1775 |
| - | |
1776 |
| - | |
1777 |
| - | |
1778 |
| - | |
1779 |
| - | |
1780 |
| - | |
1781 |
| - | |
1782 |
| - | |
1783 |
| - | |
| 1791 | + | |
1784 | 1792 |
| |
1785 |
| - | |
| 1793 | + | |
1786 | 1794 |
| |
1787 | 1795 |
| |
1788 | 1796 |
| |
1789 |
| - | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1790 | 1808 |
| |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
1791 | 1823 |
| |
1792 | 1824 |
| |
1793 | 1825 |
| |
|
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)