Re: pg_restore should restore the schema comments and the database properties

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Daniel Migowski <dmigowski(at)ikoffice(dot)de>
Subject: Re: pg_restore should restore the schema comments and the database properties
Date: 2011-12-20 14:15:08
Message-ID: 201112200615.09070.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, December 20, 2011 2:48:31 am Daniel Migowski wrote:
> Hi,
>
> I know this discussion has already been made, but for us it is a real
> problem that database properties are not restored with pg_restore. For me,
> the comment on a database, as well as the properties like pg_search_path
> are part of the data of the database. They are even contained in the
> dumps, so please add a function to pg_restore to let me restore this data
> also. It is really annoying not to be able to just use DROP DATABASE,
> CREATE DATABASE and pg_restore to get exactly the same thing you had
> before.

search_path is in postgressql.conf, so you can get back to your state by copying
it over.

>
> I would also like a function that does a CREATE DATABASE on restore
> automatically, but I don't want to wish for too much here.

http://www.postgresql.org/docs/9.0/interactive/app-pgrestore.html

-C
--create

Create the database before restoring into it. (When this option is used, the
database named with -d is used only to issue the initial CREATE DATABASE
command. All data is restored into the database name that appears in the
archive.)

If you are using plain text then you will need to supply the above to the
pg_dump command.

>
> Thank you very much in advance,
> Daniel Migowski
>
d
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-12-20 14:35:51 Re: pg_restore should restore the schema comments and the database properties
Previous Message Greg Smith 2011-12-20 13:44:20 Re: fsync on ext4 does not work