Re: pg_dump --comment?

From: Chris Campbell <chris(at)bignerdranch(dot)com>
To: hf517(at)protecting(dot)net
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump --comment?
Date: 2004-05-31 23:14:08
Message-ID: 40BBBC40.3040804@bignerdranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Harald Fuchs wrote:

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

How could I dump using the custom format, and then use "dumpfile" with
pg_restore to restore the dump? If I just prepend the comment to the
file, then pg_restore will choke, since the file won't be in the proper
custom format. I would have to remove the comment before sending the
file to pg_restore. Is there an easy way to do that? That can be easily
automated, and not take a huge amount of time given a 4 gig dump file
that must be modified?

Given those requirements, building a commenting mechanism into the
custom format would work out very nicely, I think.

Thanks!

- Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-01 00:24:19 Fast index build vs. PITR
Previous Message pgsql 2004-05-31 21:05:45 Re: Help

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-06-01 00:33:55 Re: CVS tip problems
Previous Message Oliver Elphick 2004-05-31 20:36:12 Re: CVS tip problems