Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7700597

Browse files
committed
In pg_dump, show server and pg_dump versions with or without --verbose.
We used to print this information only in verbose mode, but it's arguedthat it's useful enough to print always; one reason being that thisprovides some documentation about which Postgres versions the dump ismeant to reload into.Jing Wang, reviewed by Jeevan Chalke
1 parent3088cc3 commit7700597

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,17 @@ RestoreArchive(Archive *AHX)
353353

354354
ahprintf(AH,"--\n-- PostgreSQL database dump\n--\n\n");
355355

356+
if (AH->archiveRemoteVersion)
357+
ahprintf(AH,"-- Dumped from database version %s\n",
358+
AH->archiveRemoteVersion);
359+
if (AH->archiveDumpVersion)
360+
ahprintf(AH,"-- Dumped by pg_dump version %s\n",
361+
AH->archiveDumpVersion);
362+
363+
ahprintf(AH,"\n");
364+
356365
if (AH->public.verbose)
357-
{
358-
if (AH->archiveRemoteVersion)
359-
ahprintf(AH,"-- Dumped from database version %s\n",
360-
AH->archiveRemoteVersion);
361-
if (AH->archiveDumpVersion)
362-
ahprintf(AH,"-- Dumped by pg_dump version %s\n",
363-
AH->archiveDumpVersion);
364366
dumpTimestamp(AH,"Started on",AH->createDate);
365-
}
366367

367368
if (ropt->single_txn)
368369
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp