git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d537e0b)
IMHO, --single-transaction should wrap *all* the commands in BEGIN/COMMIT,
2006年2月13日 21:30:19 +0000 (21:30 +0000)
2006年2月13日 21:30:19 +0000 (21:30 +0000)
not just some of them.


diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index dff02d67ceefa627ebe7c7dd755a281934a96304..0000b3a00a3b3bade718a61ed0c7285cb1b7bd05 100644 (file)
--- 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.123 2006年02月12日 06:11:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.124 2006年02月13日 21:30:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -213,6 +213,9 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
if (AH->public.verbose)
dumpTimestamp(AH, "Started on", AH->createDate);
+ if (ropt->single_txn)
+ ahprintf(AH, "BEGIN;\n\n");
+
/*
* Establish important parameter values right away.
*/
@@ -220,9 +223,6 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
AH->stage = STAGE_PROCESSING;
- if (ropt->single_txn)
- ahprintf(AH, "BEGIN;\n\n");
-
/*
* Drop the items at the start, in reverse order
*/
@@ -376,7 +376,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
}
}
- if (ropt->single_txn)
+ if (ropt->single_txn)
ahprintf(AH, "COMMIT;\n\n");
if (AH->public.verbose)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /