From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Clean out column-level pg_init_privs entries when dropping table |
Date: | 2024-06-14 20:20:53 |
Message-ID: | E1sIDPp-001WhY-1I@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0a39343ae7d7430f4a993c404d95162f60daf937
Modified Files
--------------
src/backend/catalog/dependency.c | 21 +++++++++++++++------
.../modules/test_pg_dump/expected/test_pg_dump.out | 7 +++++++
src/test/modules/test_pg_dump/sql/test_pg_dump.sql | 5 +++++
3 files changed, 27 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2024-06-16 07:30:28 | pgsql: doc: fix typo in create role manual. |
Previous Message | Tom Lane | 2024-06-14 19:29:32 | pgsql: Fix misc_sanity test to accept SHARED_DEPENDENCY_INITACL entries |