By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,695 Members | 1,956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,695 IT Pros & Developers. It's quick & easy.

pg_dump on one user not whole database

P: n/a
The postgreSQL release used is 7.3.4. We would like to dump the objects for
particular user. How? I used -U option, the result still dump all the objects
with all the users.

In order to migrate to 7.4, if the users were not created in 7.4 the pg_dump
result will fail or create under wrong user. How to prevent this?

What is different between pg_restore and psql if restore the pg_dump result? I
tried to use pg_restore, but it always fail. However, using psql it work. In
turn of the performance, which one is the faster?

Thanks
--
Ruth Hsieh
Mobility IN, Lucent Technologies

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

http://archives.postgresql.org

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Quoting Ruth Hsieh <rh****@lucent.com>:
The postgreSQL release used is 7.3.4. We would like to dump the objects for
particular user. How? I used -U option, the result still dump all the
objects
with all the users.
The -U is just the user you connect as. I think you what you might be wanting
to do dump a particular table or database. Some more information about how your
system is set up would be useful here but I think a not so elegant solution
would be so dump each database own by the user your want manual. There may be a
way to dump all the database's owned by a certain user but I don't know.
In order to migrate to 7.4, if the users were not created in 7.4 the pg_dump
result will fail or create under wrong user. How to prevent this?
I had a problem with this when I was test 7.4beta5. The easiest thing to do I
round was to use the pg_dumpall program from 7.4. You can dump over a tcp/ip
connection. I had no problems loading data from 7.1.3 or 7.3.4 using that method.
What is different between pg_restore and psql if restore the pg_dump result?
I
tried to use pg_restore, but it always fail. However, using psql it work.
In
turn of the performance, which one is the faster?
I don't use pg_restore because I prefer to dump as text. Pg_restore gives you
better flexibility in your restores but it is not text based. I don't know but
I supect that pg_restore is probably faster on "large" data sets.
Thanks
--
Ruth Hsieh
Mobility IN, Lucent Technologies

--
Keith C. Perry, MS E.E.
Director of Networks & Applications
VCSN, Inc.
http://vcsn.com

____________________________________
This email account is being host by:
VCSN, Inc : http://vcsn.com

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.