Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 12th, 2005, 12:57 AM
Ruth Hsieh
Guest
 
Posts: n/a
Default pg_dump on one user not whole database

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

  #2  
Old November 12th, 2005, 12:58 AM
Keith C. Perry
Guest
 
Posts: n/a
Default Re: pg_dump on one user not whole database

Quoting Ruth Hsieh <rhsieh@lucent.com>:
[color=blue]
> 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.[/color]

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.
[color=blue]
> 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?[/color]

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.
[color=blue]
> 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?[/color]

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.
[color=blue]
> Thanks
> --
> Ruth Hsieh
> Mobility IN, Lucent Technologies[/color]


--
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 majordomo@postgresql.org

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles