Re: BUG #17630: pg_dump error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17630: pg_dump error
Дата
Msg-id 3953507.1665356030@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17630: pg_dump error  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-bugs
Christophe Pettus <xof@thebuild.com> writes:
>> 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
ofthe 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: 

Another way with slightly fewer keystrokes is

    pg_dump ... --table '"TABLE2"'

Of course, if you're also in the habit of putting single-quotes in
your table names, that'll still need some work.  The main point is
that there are two layers of quoting that you have to deal with:
the shell's, and then SQL's.

            regards, tom lane



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

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Re: BUG #17630: pg_dump error
Следующее
От: Erwin Brandstetter
Дата:
Сообщение: Default framing option RANGE adds cost for no gain to some window functions