1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

Add psql option:

-1 or --single-transaction

Simon Riggs
This commit is contained in:
Bruce Momjian
2006-02-12 04:04:32 +00:00
parent 3884ede663
commit 0f57851e31
9 changed files with 76 additions and 22 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.121 2006/02/09 20:52:13 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.122 2006/02/12 04:04:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -217,6 +217,9 @@ 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
*/
@ -370,6 +373,9 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
}
}
if (ropt->single_txn)
ahprintf(AH, "COMMIT;\n\n");
if (AH->public.verbose)
dumpTimestamp(AH, "Completed on", time(NULL));