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

Re: pg_dump --comment?

From: Harald Fuchs <hf517(at)protecting(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump --comment?
Date: 2004-05-28 10:55:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
In article <40B69F86(dot)2020002(at)bignerdranch(dot)com>,
Chris Campbell <chris(at)bignerdranch(dot)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


In response to


pgsql-hackers by date

Next:From: Gaetano MendolaDate: 2004-05-28 11:35:10
Subject: Re: tablespaces and DB administration
Previous:From: Andreas PflugDate: 2004-05-28 10:33:47
Subject: Re: tablespaces and DB administration

pgsql-patches by date

Next:From: Andrew DunstanDate: 2004-05-28 11:04:05
Subject: Re: Re : Win32 binaries test / pg_dump problem
Previous:From: Cyril VELTERDate: 2004-05-28 10:18:57
Subject: Re: Re : Win32 binaries test / pg_dump problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group