Re: pg_dump --comment? - Mailing list pgsql-hackers

From Harald Fuchs
Subject Re: pg_dump --comment?
Date
Msg-id pu3c5kvn0g.fsf@srv.protecting.net
Whole thread Raw
In response to pg_dump --comment?  (Chris Campbell <chris@bignerdranch.com>)
Responses Re: pg_dump --comment?
List pgsql-hackers
In article <40B69F86.2020002@bignerdranch.com>,
Chris Campbell <chris@bignerdranch.com> writes:

> I've encountered a situation where I'd like to store some information
> about the database when I do a pg_dump. For instance, the timestamp of
> the dump. And some other information that I pull from the database.

> If pg_dump had a --comment flag that allowed me to pass a string that
> would be stored inside the dumpfile, that I could then retrieve in
> some way (without doing a full restore of the dump), that would meet
> my needs. In discussing this idea with other people, it sounded like a
> general-use feature that mankind as a whole could benefit from. :)

Why don't you just do
 ( echo "-- This is my comment"   pg_dump whatever ) > dumpfile

?



pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Win32, PITR, nested transactions, tablespaces
Next
From: Andreas Pflug
Date:
Subject: Re: tablespaces and DB administration