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
?