Re: Cannot perform a plain-text backup with pgAdmin III v1.12.2

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Cannot perform a plain-text backup with pgAdmin III v1.12.2
Дата
Msg-id 4D88814F.8010909@lelarge.info
обсуждение исходный текст
Ответ на Cannot perform a plain-text backup with pgAdmin III v1.12.2  (David Landgren <david@landgren.net>)
Ответы Re: Cannot perform a plain-text backup with pgAdmin III v1.12.2  (David Landgren <david@landgren.net>)
Список pgadmin-support
Hi,

Le 22/03/2011 10:55, David Landgren a écrit :
> [...]
> I've encountered a bug in pgAdmin III that prevents me from doing a
> plain text backup (I want to transfer the contents of a newly-created
> table from a development environment to production).
> 
> Steps to reproduce:
> 
> 1. Select the table, choose Maintenance|Backup and in the first tab I
> choose Format: Plain.
> 
> 2. Dump Options #1) Check "Only Data" and "Use Insert Commands"
> 
> 3. Dump Options #2 Check "Verbose messages" (checked by default).
> 
> 4. Objects: Check the table to be dumped.
> 
> 5. Click on OK and I get:
> 
> C:\Program Files\PostgreSQL\8.3\bin\pg_dump.exe --host pg.example.com
> --port 5432 --username "user" --format plain --data-only --inserts
> --verbose --file "c:\temp\lg.sql" --table "public.lookup_group" \"cp-dev\"
> 
> Note the escaped quotes. pg_dump replies with:
> 
> FATAL:  database ""cp-dev"" does not exist
> 
> It's looking for a database named '"cp-dev"' rather than 'cp-dev' and
> thus fails.
> 

Yeah, this is a known bug in 1.12 which has been fixed. But there's
still not a new release since the fix has been commited.

> If I review the properties of the database definition, I have:
> 
> CREATE DATABASE "cp-dev"
>   WITH OWNER = "cpgrp-rw"
>        ENCODING = 'UTF8'
>        TABLESPACE = pg_default
>        CONNECTION LIMIT = -1;
> GRANT CONNECT ON DATABASE "cp-dev" TO cpusro;
> GRANT ALL ON DATABASE "cp-dev" TO cpusrw;
> 
> So the quotes are coming from there, although I did not explicitly enter
> them when defining the connection.
> 

You're right, you didn't specify them. Nevertheless, they are needed
because of the dash (or minus sign) in the database name. pgAdmin knows
that it had to add them.

> A workaround exists: since the command is displayed, one only needs to
> copy it into a text editor and correct the offending argument and then
> run that from the command line manually. (Although I also needed to
> surround the entire program path in quotes to prevent the shell from
> interpreting the first argument as "C:\Program").
> 
> version: pgAdmin III v1.12.2 (Dec 13 2010, rev:REL-1_12_2)
> platform: Windows XP SP3
> 
> Regards,
> David Landgren
> 


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


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

Предыдущее
От: David Landgren
Дата:
Сообщение: Cannot perform a plain-text backup with pgAdmin III v1.12.2
Следующее
От: Roger Demetrescu
Дата:
Сообщение: How do I configure pgAdmin to ask for username when connecting to a server?