The dump completed fine but when I attempted to restore the table using pg_restore to another database, it tried to create the table in testuser1 schema. The restore failed since testuser1 schema does not exist in the target database. When I created a testuser1 schema in the target database, the restore worked fine. Since the dump toc is in binary format, I could not make the change to reflect the new target schema, testuser2.
So, how should I go about restoring tables from one schema to a different schema name?
Thanks.
Tiff
Can you not simply rename the schema after importing it? Perhaps renaming an exiting version first, if necessary. Rename schema A to B; import schema A; rename A to C; rename B to A;