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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in
Дата
Msg-id 3683.1172511792@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in  ("Eugene" <eugenekuz@mail.ru>)
Список pgsql-bugs
"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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Eugene"
Дата:
Сообщение: BUG #3079: pg_dump doesn't dump datascheme with uppercase letters in
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: [PATCHES] BUG #2969: Inaccuracies in Solaris FAQ