Pg-restore Only Privileges/ACL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Is there a way to restore only the privileges/ACL of a relation or
whole database?

Often I've restored most of a database when some roles were missing.
Usually this produces valid data and DDL except for some missing Grant
statements. It's easy enough to extract Grants from plain SQL, but
with the Pgdump format it's not obvious to me.

Dropping and restoring the whole database seems like overkill. Ideally
I'd expect an option like "--privileges-only" or "--acl-only" that can
also be isolated to one table with "--table".

On a related note, why does "--schema-only" include Grant statements
when restoring the entire structure but not when restoring only
certain table(s)?
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJO5liVAAoJENTiWtMHborMAHUIAJw3puTg5edKkIIAK99OPptw
PTkxMX1xSJlCzGxlLY+c7b0Ws6fVlbJ4eJluxynx8EiqhfQs16MyN+pyhHI1wZje
V+8qxta5xmPUv1Vxhgoeh/AUJZsOfUxMRk/uIKwA0kgBezZvl4gzqy23+GSKQ/Oz
qFqGZWP8f/4R2l6mhmq6hCVLtqjieWfVY6v+OIu4LxjGfw+0iEyhkaSXxzvIehzw
IshNOJ3+oFkUdKCCHtHxty/4w23cwXMPJsA2UgqAMWvw4N1N8EnuDKIg76j3KWr+
kIYkSHsDjqwgwbyRzLEinDi1kMWxYTLpV+yimRDc65I/Qh6C/L66W97TRBsJw2k=
=7LvW
-----END PGP SIGNATURE-----


Privileged/Confidential Information may be contained in this message.

If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux