Qualify table usage in dumpTable() and use regclass
authorStephen Frost <sfrost@snowman.net>
Wed, 25 May 2016 00:10:16 +0000 (20:10 -0400)
committerStephen Frost <sfrost@snowman.net>
Wed, 25 May 2016 00:10:16 +0000 (20:10 -0400)
commit2e8b4bf80473d0e4a4254b417424e79195a9ce6a
treed6e3dbaf63969ee5898dbe661e68f6bbd008cf23
parent2d2e40e3befd8b9e0d2757554537345b15fa6ea2
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.
src/bin/pg_dump/dumputils.c
src/bin/pg_dump/pg_dump.c
src/test/modules/test_pg_dump/t/001_base.pl