pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christophe Pettus <xof@thebuild.com>
To: killerwzb@163.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17630: pg_dump error
Date: Sun, 9 Oct 2022 15:20:40 -0700
Message-ID: <3B75DF91-FB87-4580-88CD-AF6B78ABFA80@thebuild.com> (raw)
In-Reply-To: <17630-0947c0a5aa573243@postgresql.org>
References: <17630-0947c0a5aa573243@postgresql.org>



> 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 the table, 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$ 






view thread (3+ messages)  latest in thread

Message-ID: <3B75DF91-FB87-4580-88CD-AF6B78ABFA80@thebuild.com>
Permalink:  ../3B75DF91-FB87-4580-88CD-AF6B78ABFA80@thebuild.com/
Also on:    postgresql.org/message-id/3B75DF91-FB87-4580-88CD-AF6B78ABFA80@thebuild.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: xof@thebuild.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17630: pg_dump error
  In-Reply-To: <3B75DF91-FB87-4580-88CD-AF6B78ABFA80@thebuild.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox