469,111 Members | 1,985 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,111 developers. It's quick & easy.

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 1143

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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.