BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in

Started by Eugeneabout 19 years ago2 messagesbugs
Jump to latest
#1Eugene
eugenekuz@mail.ru

The following bug has been logged online:

Bug reference: 3079
Logged by: Eugene
Email address: eugenekuz@mail.ru
PostgreSQL version: 8.2.0 - 8.2.3
Operating system: WinXP
Description: pg_dump doesn't dump datascheme with uppercase letters
in
Details:

When a datascheme contains uppercase letters in its name, pg_dump doesn't
recognize the scheme as valid
It prints "No matching schemas were found"

Ex.
There are a scheme with name "Schema".

pg_dump -n "Schema" -U postgres database

pg_dump:No matching schemas were found

rename "Scheme" to "schema" then

pg_dump -n "Schema" -U postgres database

...
...

Works good

P.S.
in postgresql-8.1 package it works anyway

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Eugene (#1)
Re: BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in

"Eugene" <eugenekuz@mail.ru> writes:

When a datascheme contains uppercase letters in its name, pg_dump doesn't
recognize the scheme as valid

pg_dump -n "Schema" -U postgres database

pg_dump:No matching schemas were found

This is not a bug. The problem is that there are two levels of quoting
needed: one for the shell and one for SQL. As you wrote it, the double
quotes are stripped off by the shell and so pg_dump gets Schema, which
is case-folded per normal SQL rules. So you need to write

pg_dump -n '"Schema"' -U postgres database

Now, the shell eats the single quotes and passes "Schema" to pg_dump.

regards, tom lane