Re: pg_dump design problem (bug??)

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump design problem (bug??)
Date: 2006-05-09 21:06:21
Message-ID: 1147208781l.18374l.19l@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 05/09/2006 03:47:20 PM, Tom Lane wrote:
> "Karl O. Pinc" <kop(at)meme(dot)com> writes:
> > I'm wondering if there's a problem with pg_dump --create,
> > or if I'm just missing something.
> > It does not seem to restore things like:
> > ALTER DATABASE foo SET "DateStyle" TO European;
> > Shouldn't the database that is re-created be like
> > the database that is being dumped?
>
> I don't see any particular problem with leaving it to pg_dumpall, in
> any case. pg_dump is already assuming that you've correctly set up
> cluster-wide state; for example it doesn't create users for you.

Thing is, I don't see the ALTER DATABASE x SET ... to be part of
a cluster-wide structure, I see it as belonging to a database.
(I do see your point as far as database owners go.)
The convenient way to backup and restore a single database
is to use pg_dump. I could do a pg_dumpall --schema-only and
then remove everything not having to do with the specific db
I'm interested in when I want to, say, copy a database from
one machine to another, but it's a hassle.

The SETs make a big difference. I was looking in the wrong
schema because I didn't restore my database's my search_path
properly.

Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo Cortés 2006-05-09 21:06:53 Re: install postgres on usb drive???
Previous Message John Purser 2006-05-09 21:03:50 Re: install postgres on usb drive???