PGDUMP Bug

Started by Satheesan K Nairover 15 years ago3 messagesbugs
Jump to latest
#1Satheesan K Nair
support@shakthiinnovators.com

Dear PGSQL Master,

I have a data base in PostgreSql 8.1 version. I have created an Additional Schema named "Jay Jay Mills Lanka (Private) Limited". There is 475 tables in this schema and I want to take table-wise backup.

But its giving the error. Please refer below command line.

C:\pgsql\bin>pg_dump.exe -h dbserver -p 5432 -U streamline -F c -v -f "C:\backup\wrm_batch.backup" -t wrm_batch -n "Jay Jay Mills Lanka (Private) Limited" "16mar10"
pg_dump: No matching schemas were found
pg_dump: *** aborted because of error

Thanks and regards,
Satheesan K Nair

#2Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Satheesan K Nair (#1)
Re: PGDUMP Bug

"Satheesan K Nair" <support@shakthiinnovators.com> wrote:

C:\pgsql\bin>pg_dump.exe -h dbserver -p 5432 -U streamline -F c -v
-f "C:\backup\wrm_batch.backup" -t wrm_batch -n "Jay Jay Mills
Lanka (Private) Limited" "16mar10"

I don't know about Windows, but on Linux you would need apostrophe
quoting around the double-quotes in that context:

-n '"Jay Jay Mills Lanka (Private) Limited"'

Otherwise the OS eats your quote characters and PostgreSQL doesn't
know about them, so it would fold the schema name to lower case.

-Kevin

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Grittner (#2)
Re: PGDUMP Bug

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:

"Satheesan K Nair" <support@shakthiinnovators.com> wrote:

C:\pgsql\bin>pg_dump.exe -h dbserver -p 5432 -U streamline -F c -v
-f "C:\backup\wrm_batch.backup" -t wrm_batch -n "Jay Jay Mills
Lanka (Private) Limited" "16mar10"

I don't know about Windows, but on Linux you would need apostrophe
quoting around the double-quotes in that context:

-n '"Jay Jay Mills Lanka (Private) Limited"'

Otherwise the OS eats your quote characters and PostgreSQL doesn't
know about them, so it would fold the schema name to lower case.

Not only case-folding: the argument of -n is actually a regex pattern,
and parentheses are special in regexes. The double quotes would fix
both of those things though.

Personally I'd think twice or three times about using a schema name like
that. But you can do it, if you can figure out how to get Windows to
include a double quote in a command argument.

regards, tom lane