Re: BUG #17630: pg_dump error

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: BUG #17630: pg_dump error
Дата
Msg-id 3B75DF91-FB87-4580-88CD-AF6B78ABFA80@thebuild.com
обсуждение исходный текст
Ответ на BUG #17630: pg_dump error  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17630: pg_dump error
Список pgsql-bugs

> On Oct 9, 2022, at 02:22, PG Bug reporting form <noreply@postgresql.org> wrote:
>    I create table with a upper name ,it is "TABLE2" .I use pg_dump to dump
> the table to a custom file,but i get some error.

It's not a bug, but it's kind of an annoying situation.  The double quotes on the command line just delimit the name of
thetable, but the shell strips them off (as you would expect), so pg_dump just gets the bare name.  You have to add
separate,escaped double-quotes, since the table name requires them: 

xof=# create table "TABLE2" (i integer);
CREATE TABLE
xof=#
\q
xof$ pg_dump --dbname=xof --table "TABLE2" > /dev/null
pg_dump: error: no matching tables were found
xof$ pg_dump --dbname=xof --table "\"TABLE2\"" > /dev/null
xof$




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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17630: pg_dump error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17630: pg_dump error