Re: pg_dump and alter database

From: <btober(at)seaworthysys(dot)com>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <btober(at)seaworthysys(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump and alter database
Date: 2003-08-22 14:54:51
Message-ID: 64978.216.238.112.88.1061564091.squirrel@$HOSTNAME
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> <btober(at)seaworthysys(dot)com> writes:
>> The problem I have is that the SQL DDL and DML produced by pg_dump
>> fails to include the ALTER DATABASE ... SET search_path ... statement
>> that sets the search path for when I re-load the database from a dump
>> file.
>
> This functionality is in pg_dumpall, not pg_dump.
>
> (Whether that's the right place for it is debatable, perhaps.)

I thought maybe I overlooked that, however, I don't see any explicit
reference to this in man pg_dumpall.

I HAVE used pg_dumpall -g to make a backup of of users and groups, but
this output does not include the ALTER DATABASE commands. (I have not
used pg_dumpall to backup an entire database cluster, however.)

Does the ALTER DATABASE command get written only when I do an
unconditional pg_dumpall, i.e., produce a dump of all databases in the
cluster? If that is the case, then I do think the feature ought to be
included in pg_dump, because schemas would, I think, generally be
database-specific and not necessarily applicable to all databases in a
cluster, and so it would seem to make sense to have it in included in the
output from pg_dump, IMHO. Can that be made to happen? (Sorry that I
don't know enough about the PostgreSQL to take a stab at modifiying the
source code myself to implements this.)

~Berend Tober

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-08-22 15:00:27 Re: [HACKERS] Buglist
Previous Message Alvaro Herrera 2003-08-22 14:52:43 Re: Schema