Unable to backup table when quotation marks used in the name

From: maiesky(at)poczta(dot)onet(dot)pl
To: pgsql-admin(at)postgresql(dot)org
Subject: Unable to backup table when quotation marks used in the name
Date: 2010-10-20 12:28:24
Message-ID: Q43446609-0d2f9b0739166574e7ee3218c2bb6a73@pmq2.m5r2.onet.test.onet.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I am running pgAdmim 1.12 on WinXP SP3 but this issue was observed in
previous releases also.
When trying to do a backup of a table which has quotation marks in its name
or in schema name then getting error:
(example1 quotation marks in schema name)

C:\Program Files\pgAdmin III\1.12\pg_dump.exe --host XXX.com --port 5432
--username XXXX --format plain --data-only --verbose --file "C:\moja.sql"
--table "TT_settings".moja "TT_dudulu"
pg_dump: No matching tables were found
pg_dump: *** aborted because of error

Process returned exit code 1.

or
(example2 quotation marks in table name)

C:\Program Files\pgAdmin III\1.12\pg_dump.exe --host XXX.com --port 5432
--username XXXX --format plain --data-only --verbose --file "C:\cwtest2.sql"
--table n_dms."CFX" "TT_dudulu"
pg_dump: No matching tables were found
pg_dump: *** aborted because of error

Process returned exit code 1.

To bypass this problem I can manually run script with added surrounding
quotation marks around the access path and escaping chars included in the
name:
for the first example:
"\"TT_settings\".moja"

for second example:
"n_dms.\"CFX\""

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message maiesky 2010-10-20 12:38:53 Can't remove filter when no rows returned
Previous Message Robert Treat 2010-10-20 03:42:03 Re: WAL log shipping + Streaming replication PG 9.0 questions