Re: pg_restore exclude schema from being droped option - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_restore exclude schema from being droped option
Date
Msg-id 29142.1169846324@sss.pgh.pa.us
Whole thread Raw
In response to pg_restore exclude schema from being droped option  (Kostis Mentzelos <mentzelos@gmx.net>)
List pgsql-hackers
Kostis Mentzelos <mentzelos@gmx.net> writes:
> Now, to backup the database I choose to create 2 scripts, BackupData.sh 
> to backup all small tables and BackupHist.sh to backup history tables. 
> When I call pg_restore -c to restore data tables, pg_restore report a 
> failure because it is trying to drop a schema that it is not empty.

Why (or how) is the schema part of the backup at all?  If you used
pg_dump's -t switch to select the tables to back up, there should not be
a schema entry in the dump.  So there's something you're not telling us
about how you are using the tools.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Recursive query syntax ambiguity
Next
From: "Simon Riggs"
Date:
Subject: Re: Proposal: Snapshot cloning