Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server


  • From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
  • To: "shakahshakah(at)gmail(dot)com" <shakahshakah(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server
  • Date: Sun, 29 Nov 2009 12:38:06 +1100
  • Message-id: <4B11D07E.6050407@rhyme.com.au> <text/plain>

shakahshakah(at)gmail(dot)com wrote:
> -- PostgreSQL database dump
> --
> -- pg_dump version: 8.5devel
> --
> -- remote database version: 8.5devel (80500)
> --
>   


FWIW, and I havent read the entire thread, but pg_dump already *stores*
this information in a custom format. Try:

pg_dump -Fc blah
pg_restore -L ...

and you will get something like:

;
; Archive created at Sun Nov 29 12:34:24 2009
;     dbname: blah
;     TOC Entries: 202
;     Compression: -1
;     Dump Version: 1.10-0
;     Format: CUSTOM
;     Integer: 4 bytes
;     Offset: 8 bytes
;     Dumped from database version: 8.0.3
;     Dumped by pg_dump version: 8.0.3
;

so, all that is needed is to add the relevant statements into the output
code.





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group