> 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$