mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									3088cc3704
								
							
						
					
					
						commit
						7700597b34
					
				| @ -353,16 +353,17 @@ RestoreArchive(Archive *AHX) | |||||||
| 
 | 
 | ||||||
| 	ahprintf(AH, "--\n-- PostgreSQL database dump\n--\n\n"); | 	ahprintf(AH, "--\n-- PostgreSQL database dump\n--\n\n"); | ||||||
| 
 | 
 | ||||||
| 	if (AH->public.verbose) |  | ||||||
| 	{ |  | ||||||
| 	if (AH->archiveRemoteVersion) | 	if (AH->archiveRemoteVersion) | ||||||
| 		ahprintf(AH, "-- Dumped from database version %s\n", | 		ahprintf(AH, "-- Dumped from database version %s\n", | ||||||
| 				 AH->archiveRemoteVersion); | 				 AH->archiveRemoteVersion); | ||||||
| 	if (AH->archiveDumpVersion) | 	if (AH->archiveDumpVersion) | ||||||
| 		ahprintf(AH, "-- Dumped by pg_dump version %s\n", | 		ahprintf(AH, "-- Dumped by pg_dump version %s\n", | ||||||
| 				 AH->archiveDumpVersion); | 				 AH->archiveDumpVersion); | ||||||
|  | 
 | ||||||
|  | 	ahprintf(AH, "\n"); | ||||||
|  | 
 | ||||||
|  | 	if (AH->public.verbose) | ||||||
| 		dumpTimestamp(AH, "Started on", AH->createDate); | 		dumpTimestamp(AH, "Started on", AH->createDate); | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	if (ropt->single_txn) | 	if (ropt->single_txn) | ||||||
| 	{ | 	{ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user