Re: Error with pgAdmin III backup/restore

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Error with pgAdmin III backup/restore
Дата
Msg-id 4D22777B.6010209@lelarge.info
обсуждение исходный текст
Ответ на Error with pgAdmin III backup/restore  (Sean Ayres <sayresvt@gmail.com>)
Ответы Re: Error with pgAdmin III backup/restore  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgadmin-support
Le 28/12/2010 03:46, Sean Ayres a écrit :
> I've run into an issue with the default backup/restore of a database in
> pgAdmin (the one bundled with PostgreSQL 9.02).  I am currently running
> Version 1.12.2 (Dec 14 2010, rev: REL-1_12_2) on PostgreSQL 9.02.  The issue
> has occurred for me on Windows 7 Ultimate (32-bit) and Windows Server 2003
> (32-bit R2 Service Pack 2).
> 
> The error occurs when I try to backup either one of my PostGIS databases
> with the default options selected.
> Format: COMPRESS (No Compress Ratio or Encoding specified)
> Dump Options #1: Only "Blobs" is checked
> Dump Options #2: Only "Verbose messages" is checked
> Objects: All objects are selected (Database, schema, and all tables)
> 
> My database names contain no quotes or special characters other than a
> single underscore (example: Test_Exits, Test_GIS, etc.)
> 
> ------------------------------------------------------------------------------------------------------------------
> The error message I receive when trying to backup is the following:
> 
> C:/Applications/PostgreSQL/9.0/bin\pg_dump.exe --host localhost --port 5432
> --username "postgres" --format custom --blobs --verbose --file
> "C:\Applications\Test.backup" \"Test_Exits\"
> pg_dump: [archiver (db)] connection to database ""Test_Exits"" failed:
> FATAL:  database ""Test_Exits"" does not exist
> pg_dump: *** aborted because of error
> 
> Process returned exit code 1.
> ------------------------------------------------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------------------------------------------
> The error message I receive when trying to restore is the following:
> 
> C:/Applications/PostgreSQL/9.0/bin\pg_restore.exe --host localhost --port
> 5432 --username postgres --dbname \"Test_Exits\" --verbose
> "C:\Applications\OpenTMS_Exits.backup"
> pg_restore: connecting to database for restore
> pg_restore: [archiver (db)] connection to database ""Test_Exits"" failed:
> FATAL:  database ""Test_Exits"" does not exist
> pg_restore: *** aborted because of error
> 
> Process returned exit code 1.
> ------------------------------------------------------------------------------------------------------------------
> 
> It seemed obvious to me that the escape characters ( \ ) before the double
> quotes caused the issue.  Running the commands in the psql shell without the
> two backslashes around the database name caused both the backup and restore
> to work properly.  I'm wondering if this issue was introduced by the change
> made for Ticket#266 <http://code.pgadmin.org/trac/ticket/266>?
> 

I'm able to reproduce this. You're right that the quoting of the
database name is not good at all. We need a better way to do this. What
I did is almost working. Still need to fix one issue.

Anyway, thanks for your report.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


В списке pgadmin-support по дате отправления:

Предыдущее
От: Jan-Peter.Seifert@gmx.de
Дата:
Сообщение: Re: 1.12.1 - cannot dump from older server versions
Следующее
От: "Jan-Peter Seifert"
Дата:
Сообщение: Re: 1.12.1 - cannot dump from older server versions