Re: BUG #3760: Comment on restore database

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Malcus Imhof <malcus(at)terra(dot)com(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3760: Comment on restore database
Date: 2007-11-19 18:41:46
Message-ID: 200711191841.lAJIfkU29118@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Malcus Imhof wrote:
>
> The following bug has been logged online:
>
> Bug reference: 3760
> Logged by: Malcus Imhof
> Email address: malcus(at)terra(dot)com(dot)br
> PostgreSQL version: 8.2.5
> Operating system: Windows 2003
> Description: Comment on restore database
> Details:
>
> When I'm restoring a dump done in a database called "client" on a new
> database called "new_database" shows a error when the pg_restore try to
> restore the comment:
>
> C:\Arquivos de programas\pgAdmin III\1.8\pg_restore.exe -i -h 192.168.0.11
> -p 5432 -U postgres -d "new_database" -v "C:\Documents and
> Settings\Ciro\Desktop\client.backup"
> pg_restore: connecting to database for restore
> pg_restore: creating COMMENT DATABASE "client"
> pg_restore: WARNING: database "client" does not exist

Yea, the dump thinks it is going into the same database. I don't see
any way of fixing that. We don't allow functions for the object name.
If we did we could use current_database(). Fortunately I think it is
the only place where the database name is hardcoded in the dump.

I have added a TODO item:

o Allow COMMENT ON dbname to work when loading into a database
with a different name

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-19 18:49:45 Re: BUG #3760: Comment on restore database
Previous Message Magnus Hagander 2007-11-19 17:01:30 Re: 8.3b2: problem using "COPY ... TO/FROM .... BINARY"