Commit 7661809
committed
Clean out column-level pg_init_privs entries when dropping tables.
DeleteInitPrivs did not get the memo about how, when dropping a
whole object (with subid == 0), you should drop entries relating
to its sub-objects too. This is visible in the test_pg_dump test
case if one drops the extension at the end: the entry for
GRANT SELECT(col1) ON regress_pg_dump_table TO public;
was still present in pg_init_privs afterwards, although it was
pointing to a dangling table OID.
Noted while fooling with a fix for REASSIGN OWNED for pg_init_privs
entries. This bug is aboriginal in the pg_init_privs feature
though, and there seems no reason not to back-patch the fix.1 parent 01aa88f commit 7661809
File tree
3 files changed
+27
-6
lines changed- src
- backend/catalog
- test/modules/test_pg_dump
- expected
- sql
3 files changed
+27
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
1330 | 1332 | | |
1331 | 1333 | | |
1332 | 1334 | | |
| |||
2784 | 2786 | | |
2785 | 2787 | | |
2786 | 2788 | | |
| 2789 | + | |
2787 | 2790 | | |
2788 | 2791 | | |
2789 | 2792 | | |
| |||
2797 | 2800 | | |
2798 | 2801 | | |
2799 | 2802 | | |
2800 | | - | |
2801 | | - | |
2802 | | - | |
2803 | | - | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
2804 | 2813 | | |
2805 | 2814 | | |
2806 | | - | |
| 2815 | + | |
2807 | 2816 | | |
2808 | 2817 | | |
2809 | 2818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
0 commit comments