Content-Length: 288917 | pFad | http://github.com/postgrespro/postgres_cluster/commit/7700597b34fbb26e377f419271f65be1c13c518f

5A In pg_dump, show server and pg_dump versions with or without --verbose. · postgrespro/postgres_cluster@7700597 · GitHub
Skip to content

Commit 7700597

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 argued that it's useful enough to print always; one reason being that this provides some documentation about which Postgres versions the dump is meant to reload into. Jing Wang, reviewed by Jeevan Chalke
1 parent 3088cc3 commit 7700597

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)








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_cluster/commit/7700597b34fbb26e377f419271f65be1c13c518f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy