Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 7D6D31EE3E81 for ; Mon, 12 Dec 2011 15:40:24 -0400 (AST) Received: from mail.sparkbase.com ([66.218.191.46] helo=email.sparkbase.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RaBjZ-0007wV-L4 for pgsql-admin@postgresql.org; Mon, 12 Dec 2011 19:40:23 +0000 X-Footer: c3BhcmtiYXNlLmNvbQ== Received: from [10.3.1.60] ([207.58.220.206]) (authenticated user progers@sparkbase.com) by email.sparkbase.com (Kerio Connect 7.3.1) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for pgsql-admin@postgresql.org; Mon, 12 Dec 2011 14:40:05 -0500 Message-ID: <4EE65895.5080308@sparkbase.com> Date: Mon, 12 Dec 2011 14:40:05 -0500 From: Paul Rogers MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Pg-restore Only Privileges/ACL? Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.2 (--) X-Archive-Number: 201112/65 X-Sequence-Number: 38823 -----BEGIN PGP SIGNED MESSAGE----- Hash=3A SHA512 Is there a way to restore only the privileges/ACL of a relation or whole database=3F Often I=27ve restored most of a database when some roles were missing=2E Usually this produces valid data and DDL except for some missing Grant statements=2E It=27s easy enough to extract Grants from plain SQL=2C but with the Pgdump format it=27s not obvious to me=2E Dropping and restoring the whole database seems like overkill=2E Ideally I=27d expect an option like =22--privileges-only=22 or =22--acl-only=22 tha= t can also be isolated to one table with =22--table=22=2E On a related note=2C why does =22--schema-only=22 include Grant statements= when restoring the entire structure but not when restoring only certain table=28s=29=3F -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJO5liVAAoJENTiWtMHborMAHUIAJw3puTg5edKkIIAK99OPptw PTkxMX1xSJlCzGxlLY+c7b0Ws6fVlbJ4eJluxynx8EiqhfQs16MyN+pyhHI1wZje V+8qxta5xmPUv1Vxhgoeh/AUJZsOfUxMRk/uIKwA0kgBezZvl4gzqy23+GSKQ/Oz qFqGZWP8f/4R2l6mhmq6hCVLtqjieWfVY6v+OIu4LxjGfw+0iEyhkaSXxzvIehzw IshNOJ3+oFkUdKCCHtHxty/4w23cwXMPJsA2UgqAMWvw4N1N8EnuDKIg76j3KWr+ kIYkSHsDjqwgwbyRzLEinDi1kMWxYTLpV+yimRDc65I/Qh6C/L66W97TRBsJw2k=3D =3D7LvW -----END PGP SIGNATURE----- Privileged/Confidential Information may be contained in this message=2E If you are not the addressee indicated in this message =28or responsible fo= r delivery of the message to such person=29=2C you may not copy or deliver= this message to anyone=2E In such case=2C you should destroy this message= and kindly notify the sender by reply email=2E Please advise immediately i= f you or your employer does not consent to Internet email for messages of t= his kind=2E Opinions=2C conclusions and other information in this message t= hat do not relate to the official business of my firm shall be understood a= s neither given nor endorsed by it=2E