Re: 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server - Mailing list pgsql-hackers

From Philip Warner
Subject Re: 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server
Date
Msg-id 4B11D07E.6050407@rhyme.com.au
Whole thread Raw
In response to 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server  ("shakahshakah@gmail.com" <shakahshakah@gmail.com>)
List pgsql-hackers
shakahshakah@gmail.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.




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Timezones (in 8.5?)
Next
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a