Re: pg_dump on one user not whole database

From: "Keith C(dot) Perry" <netadmin(at)vcsn(dot)com>
To: Ruth Hsieh <rhsieh(at)lucent(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump on one user not whole database
Date: 2003-12-02 18:55:54
Message-ID: 1070391354.3fcce03a6310f@webmail.vcsn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Quoting Ruth Hsieh <rhsieh(at)lucent(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carmen Gloria Sepulveda Dedes 2003-12-02 19:01:20 Error in select
Previous Message Jan Wieck 2003-12-02 18:54:06 Re: C Programming with postgres.h - my function crashes