Malcus Imhof wrote: > > The following bug has been logged online: > > Bug reference: 3760 > Logged by: Malcus Imhof > Email address: [EMAIL PROTECTED] > 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 <[EMAIL PROTECTED]> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly