Обсуждение: Cannot perform a plain-text backup with pgAdmin III v1.12.2
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 CONNECTIONLIMIT = -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
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
On 22/03/2011 12:00, Guillaume Lelarge wrote: > 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). [...] > 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. Hmm, I did look, honest. Consider this a nudge for a new release? Thanks, David -- There's bum trash in my hall and my place is ripped I've totaled another amp, I'm calling in sick