On Mon, 2007-07-16 at 14:58 -0400, Francisco Reyes wrote: > One possible way may be: > Dump the source schema. > Remove references to the schema name in the pg_dump file. > Change search_path and restore schema. That's what I currently do. It seems a little flimsy though: there are too many objects to really remove the references by hand, so we do a global search-and-replace. As long as the schema name is unique enough, I suppose it's alright for a development (non-production) database. > > How do other people do that? Is it worth trying to add a way for > > pg_restore to rename object? > > In the particular case that you mentioned, if pg_dump could be made to not > include the schema name anywhere that should make the process easier. That's what I was thinking. It might be better placed in pg_restore though, so that way you can decide after you've already made the backup. Regards, Jeff Davis