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:
@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user