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

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: David Landgren <david(at)landgren(dot)net>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Cannot perform a plain-text backup with pgAdmin III v1.12.2
Date: 2011-03-22 11:00:31
Message-ID: 4D88814F.8010909@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message David Landgren 2011-03-22 11:46:22 Re: Cannot perform a plain-text backup with pgAdmin III v1.12.2
Previous Message David Landgren 2011-03-22 09:55:39 Cannot perform a plain-text backup with pgAdmin III v1.12.2