Content-Length: 307346 | pFad | http://github.com/postgrespro/postgres/commit/1cf13e6f3645261af7731ab308129154f6f65b62

D5 IMHO, --single-transaction should wrap *all* the commands in BEGIN/CO… · postgrespro/postgres@1cf13e6 · GitHub
Skip to content

Commit 1cf13e6

Browse files
committed
IMHO, --single-transaction should wrap *all* the commands in BEGIN/COMMIT,
not just some of them.
1 parent d537e0b commit 1cf13e6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.123 2006/02/12 06:11:50 momjian Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.124 2006/02/13 21:30:19 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -213,16 +213,16 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
213213
if (AH->public.verbose)
214214
dumpTimestamp(AH, "Started on", AH->createDate);
215215

216+
if (ropt->single_txn)
217+
ahprintf(AH, "BEGIN;\n\n");
218+
216219
/*
217220
* Establish important parameter values right away.
218221
*/
219222
_doSetFixedOutputState(AH);
220223

221224
AH->stage = STAGE_PROCESSING;
222225

223-
if (ropt->single_txn)
224-
ahprintf(AH, "BEGIN;\n\n");
225-
226226
/*
227227
* Drop the items at the start, in reverse order
228228
*/
@@ -376,7 +376,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
376376
}
377377
}
378378

379-
if (ropt->single_txn)
379+
if (ropt->single_txn)
380380
ahprintf(AH, "COMMIT;\n\n");
381381

382382
if (AH->public.verbose)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/1cf13e6f3645261af7731ab308129154f6f65b62

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy