mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Move common pg_dump code related to connections to a new file
ConnectDatabase is used by pg_dumpall, pg_restore and pg_dump so move common code to new file. new file name: connectdb.c Author: Mahendra Singh Thalor <mahi6run@gmail.com>
This commit is contained in:
@@ -414,7 +414,7 @@ RestoreArchive(Archive *AHX)
|
||||
AHX->minRemoteVersion = 0;
|
||||
AHX->maxRemoteVersion = 9999999;
|
||||
|
||||
ConnectDatabase(AHX, &ropt->cparams, false);
|
||||
ConnectDatabaseAhx(AHX, &ropt->cparams, false);
|
||||
|
||||
/*
|
||||
* If we're talking to the DB directly, don't send comments since they
|
||||
@@ -4529,7 +4529,7 @@ restore_toc_entries_postfork(ArchiveHandle *AH, TocEntry *pending_list)
|
||||
/*
|
||||
* Now reconnect the single parent connection.
|
||||
*/
|
||||
ConnectDatabase((Archive *) AH, &ropt->cparams, true);
|
||||
ConnectDatabaseAhx((Archive *) AH, &ropt->cparams, true);
|
||||
|
||||
/* re-establish fixed state */
|
||||
_doSetFixedOutputState(AH);
|
||||
@@ -5146,7 +5146,7 @@ CloneArchive(ArchiveHandle *AH)
|
||||
* Connect our new clone object to the database, using the same connection
|
||||
* parameters used for the original connection.
|
||||
*/
|
||||
ConnectDatabase((Archive *) clone, &clone->public.ropt->cparams, true);
|
||||
ConnectDatabaseAhx((Archive *) clone, &clone->public.ropt->cparams, true);
|
||||
|
||||
/* re-establish fixed state */
|
||||
if (AH->mode == archModeRead)
|
||||
|
Reference in New Issue
Block a user