From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Jose Luis Tallon <jltallon(at)adv-solutions(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_dump dump catalog ACLs |
Date: | 2016-05-10 17:47:05 |
Message-ID: | 20160510174705.GJ10850@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Alvaro Herrera (alvherre(at)2ndquadrant(dot)com) wrote:
> Stephen Frost wrote:
>
> > diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
> > index 1267afb..4a9b1bf 100644
> > --- a/src/bin/pg_dump/pg_dump.c
> > +++ b/src/bin/pg_dump/pg_dump.c
> > @@ -14992,9 +14992,10 @@ dumpTable(Archive *fout, TableInfo *tbinfo)
> > "%s AS initrattacl "
> > "FROM pg_catalog.pg_attribute at "
> > "JOIN pg_catalog.pg_class c ON (at.attrelid = c.oid) "
> > - "LEFT JOIN pg_init_privs pip ON "
> > + "LEFT JOIN pg_catalog.pg_init_privs pip ON "
> > "(pip.classoid = "
> > - "(SELECT oid FROM pg_class WHERE relname = 'pg_class') AND "
> > + "(SELECT oid FROM pg_catalog.pg_class "
> > + "WHERE relname = 'pg_class') AND "
> > " at.attrelid = pip.objoid AND at.attnum = pip.objsubid) "
> > "WHERE at.attrelid = '%u' AND "
> > "NOT at.attisdropped "
>
> The subquery comparing the OID of pg_class using only a condition on
> relname seems wrong; wouldn't it fail or produce wrong results if
> somebody creates a table named pg_class in another schema? I think you
> should write the comparison like this instead:
> classoid = 'pg_catalog.pg_class'::regclass
Errr, I could have sworn I was doing that, but clearly I'm not.
Will fix.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-05-10 18:06:19 | Re: HeapTupleSatisfiesToast() busted? (was atomic pin/unpin causing errors) |
Previous Message | Alvaro Herrera | 2016-05-10 17:43:33 | Re: pg_dump dump catalog ACLs |