dumping users objects
dumping users objects
От:
s.chava@wcom.com (Srinivasa Rao Chava)
Дата:
I have a database, called DEVE, which has got two users in it. say one user is tom and the other is james.Tom has finished his development work and james has not yet been finished. we want to move the database objects owned by tom to production.How to do it. if i take dump of the comlete database , it is including the james objects also, which i don't want to do. If I take pg_dump with -t options,i.e tables options, what about the sequences , triggers and other objects owned by tom. Moreover, it is cumbersome to take pg_dump with -t option, as there are more than 100 tables owned by tom. So please help me how to move the development schema to production, based on owner Thanks in advance for any help.
Re: dumping users objects
От:
Manuel Trujillo <manueltrujillo@dorna.es>
Дата:
El mié, 09-01-2002 a las 15:57, Srinivasa Rao Chava escribió:
> I have a database, called DEVE, which has got two users in it. say one
> user is tom and the other is james.Tom has finished his development
> work and james has not yet been finished. we want to move the database
> objects owned by tom to production.How to do it. if i take dump of the
> comlete database , it is including the james objects also, which i
> don't want to do. If I take pg_dump with -t options,i.e tables
> options, what about the sequences , triggers and other objects owned
> by tom. Moreover, it is cumbersome to take pg_dump with -t option, as
> there are more than 100 tables owned by tom.
> So please help me how to move the development schema to production,
> based on owner
> Thanks in advance for any help.
I think if you entry into database (psql DEVE), and make a \d{p|S|l}
(list permissions/system tables/objects, you could solve your litle
problem.
If you make a small shell script, you could obtain a nice report about
this information.
The \dt option, also make the same effect (more or less).
Have a nice day ;-)
TooManySecrets
--
Manuel Trujillo manueltrujillo@dorna.es
Technical Engineer http://www.motograndprix.com
Dorna Sports S.L. +34 93 4702864