Skip to content

Commit 28cdf5f

Browse files
committed
Have pg_dump (-v) verbose mode output the pg_dump and server versions in
text output mode, like we do in custom output mode. Jim Cox
1 parent edf344a commit 28cdf5f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 10 additions & 1 deletion
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.179 2010/02/18 01:29:10 tgl Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.180 2010/02/23 21:48:32 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -302,6 +302,15 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
302302

303303
ahprintf(AH, "--\n-- PostgreSQL database dump\n--\n\n");
304304

305+
if (AH->public.verbose)
306+
{
307+
ahprintf(AH, "--\n-- pg_dump version: %s\n", PG_VERSION);
308+
ahprintf(AH, "--\n-- remote database version: %s (%d)\n"
309+
,AHX->remoteVersionStr
310+
,AHX->remoteVersion) ;
311+
ahprintf(AH, "--\n\n");
312+
}
313+
305314
if (AH->public.verbose)
306315
dumpTimestamp(AH, "Started on", AH->createDate);
307316

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy