mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Qualify table usage in dumpTable() and use regclass
All of the other tables used in the query in dumpTable(), which is collecting column-level ACLs, are qualified, so we should be qualifying the pg_init_privs, the related sub-select against pg_class and the other queries added by the pg_dump catalog ACLs work. Also, use ::regclass (or ::pg_catalog.regclass, where appropriate) instead of using a poorly constructed query to get the OID for various catalog tables. Issues identified by Noah and Alvaro, patch by me.
This commit is contained in:
@ -340,9 +340,9 @@ my %tests = (
|
||||
},
|
||||
'GRANT SELECT ON TABLE regress_pg_dump_table' => {
|
||||
regexp => qr/^
|
||||
\QSELECT binary_upgrade_set_record_init_privs(true);\E\n
|
||||
\QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n
|
||||
\QGRANT SELECT ON TABLE regress_pg_dump_table TO dump_test;\E\n
|
||||
\QSELECT binary_upgrade_set_record_init_privs(false);\E
|
||||
\QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E
|
||||
$/xms,
|
||||
like => {
|
||||
binary_upgrade => 1,
|
||||
@ -362,9 +362,9 @@ my %tests = (
|
||||
},
|
||||
'GRANT SELECT(col1) ON regress_pg_dump_table' => {
|
||||
regexp => qr/^
|
||||
\QSELECT binary_upgrade_set_record_init_privs(true);\E\n
|
||||
\QSELECT pg_catalog.binary_upgrade_set_record_init_privs(true);\E\n
|
||||
\QGRANT SELECT(col1) ON TABLE regress_pg_dump_table TO PUBLIC;\E\n
|
||||
\QSELECT binary_upgrade_set_record_init_privs(false);\E
|
||||
\QSELECT pg_catalog.binary_upgrade_set_record_init_privs(false);\E
|
||||
$/xms,
|
||||
like => {
|
||||
binary_upgrade => 1,
|
||||
|
Reference in New Issue
Block a user