472,141 Members | 1,037 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,141 software developers and data experts.

Dumping pg_shadow and pg_database as SQL using pg_dump

I'd like to save the list of users, groups, and databases regularly to a
separate file (just in case). The output of pg_dumpall suffices for my need:

=================================
DELETE FROM pg_shadow WHERE usesysid <> (SELECT datdba FROM pg_database
WHERE datname = 'template0');
CREATE USER ... WITH SYSID ... PASSWORD '...' NOCREATEDB NOCREATEUSER;
....

DELETE FROM pg_group;
....

CREATE DATABASE ... WITH OWNER = ... TEMPLATE = ... ENCODING = '...';
....
=================================

But can I get these with pg_dump?

--
dave
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
0 1178

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Greg Patnude | last post: by
1 post views Thread by William Harazim | last post: by
2 posts views Thread by Kari Lavikka | last post: by
26 posts views Thread by David Garamond | last post: by
reply views Thread by stig erikson | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.