Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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
> -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>

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

In response to


pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group