From 28cdf5f7ab83717ad76773ab1a24e957e91a193d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 23 Feb 2010 21:48:32 +0000 Subject: [PATCH] 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 --- src/bin/pg_dump/pg_backup_archiver.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index f227ed1590..1d32b9fc17 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.179 2010/02/18 01:29:10 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.180 2010/02/23 21:48:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -303,6 +303,15 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt) ahprintf(AH, "--\n-- PostgreSQL database dump\n--\n\n"); if (AH->public.verbose) + { + ahprintf(AH, "--\n-- pg_dump version: %s\n", PG_VERSION); + ahprintf(AH, "--\n-- remote database version: %s (%d)\n" + ,AHX->remoteVersionStr + ,AHX->remoteVersion) ; + ahprintf(AH, "--\n\n"); + } + + if (AH->public.verbose) dumpTimestamp(AH, "Started on", AH->createDate); if (ropt->single_txn) -- 2.11.0