Re: pg_dump's "--exclude-table" and "--exclude-table-data" options are ignored and/or cause the dump to fail entirely unless both the schema and table name use 1950s-era identifiers.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: pg_dump's "--exclude-table" and "--exclude-table-data" options are ignored and/or cause the dump to fail entirely unless both the schema and table name use 1950s-era identifiers.
Дата
Msg-id CAKFQuwZwyokROXF2LLxE2DNo2fcunRCHO5k56_OrE9JitAUyYQ@mail.gmail.com
обсуждение исходный текст
Ответ на pg_dump's "--exclude-table" and "--exclude-table-data" options are ignored and/or cause the dump to fail entirely unless both the schema and table name use 1950s-era identifiers.  (tutiluren@tutanota.com)
Список pgsql-bugs
On Monday, July 20, 2020, <tutiluren@tutanota.com> wrote:
possibly "only" on Windows (only tested there):

It doesn't matter if you add quotes, which always works in PG SQL queries and which is just "how you do it".

pg_dump --format plain --verbose --file "C:\test.txt" --exclude-table-data="Personal stöff"."My däiary" --host="localhost" --port="5432" --username="postgres" --dbname="TestDB"

I've also tried a million variations of those quotes as well, including nested ones, and also tried with and without the --encoding option as well as setting the environment variable for encoding. It doesn't seem to matter -- it either fails to run the command or runs it but just ignores the exclude rules.

Not sure about encoding dynamics but your issue is likely with writing shell commands.  Instead of trying to write a full pg_dump command I suggest trying to set the value of an environment variable to the double-quoted value you want (checking it with echo) and then just supplying that variable with the pg_dump command.

Shells tend to use backslash for escaping (see the example on the pg_dump doc reference page) so you may want to try that.  Or research on the internet for the information and examples relevant to which ever shell you are using in Windows.  I’m personally experienced with Linux. 

David J.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: pg_dump's "--exclude-table" and "--exclude-table-data" options are ignored and/or cause the dump to fail entirely unless both the schema and table name use 1950s-era identifiers.
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16547: ECPG can't CALL the procedure which has INOUT parameter