diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-05 20:58:47 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-02-05 20:58:47 +0000 |
| commit | 8e4057cc7d620c08d8062505337c8dc7c262efc8 (patch) | |
| tree | 127421155747881b679a236ab0db0358ecc88f04 /src/bin/pg_dump/pg_backup_archiver.c | |
| parent | db5e39b2f0c6e0b1035b1d39d1cbfb8f324348fd (diff) | |
| download | postgresql-8e4057cc7d620c08d8062505337c8dc7c262efc8.tar.gz | |
Fix pg_restore to properly discard COPY data when trying to continue
after an error in a COPY statement. Formerly it thought the COPY data
was SQL commands, and got quite confused.
Stephen Frost
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
| -rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 4a3116245e..a60b273bcc 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.119 2006/01/21 02:16:20 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.120 2006/02/05 20:58:47 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -330,10 +330,15 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt) * with libpq. */ if (te->copyStmt && strlen(te->copyStmt) > 0) + { ahprintf(AH, "%s", te->copyStmt); + AH->writingCopyData = true; + } (*AH->PrintTocDataPtr) (AH, te, ropt); + AH->writingCopyData = false; + _enableTriggersIfNecessary(AH, te, ropt); } } |
