Hello,

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.

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.

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

--
There's bum trash in my hall and my place is ripped
I've totaled another amp, I'm calling in sick

--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Reply via email to