Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
От
Alvaro Herrera
Тема
Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
Дата
Msg-id
20200725012949.GA20763@alvherre.pgsql
Ответ на
Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows. (tutiluren@tutanota.com)
Список
Дерево обсуждения
pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows. tutiluren@tutanota.com
Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows. "David G. Johnston" <david.g.johnston@gmail.com>
Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows. Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
On 2020-Jul-25, tutiluren@tutanota.com wrote: > Although I now have a work-around, which *appears* to work, I'm still utterly confused as to *why* it works. To be clear: why is it that setting the environment variable 'PGCLIENTENCODING' to 'WIN1252' makes the pg_dump succeed when everything, including the database I'm trying to dump, uses UTF8? The only thing not using UTF8 is the "postgres" database (which indeed uses 'WIN1252', certainly not out of my active choice), but that's not involved here... My command connects to my testdb, does it not? What doesn't use UTF8 is your terminal. So when you enter the accented letter, you're not actually sending the UTF8 character you think you're sending, but instead a Win1252 character which matches nothing. When you use "cmd /U", then your terminal *is* UTF8, so the character is correct and things work. You can further test this by setting log_statements=all in postgresql.conf, sending a reload signal to postgres, and then rerunning the pg_dump command. When run in the non-UTF8 terminal, the server log file will show different garbage than when run in the UTF8 terminal. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-bugs по дате отправления
От: tutiluren@tutanota.com
Дата:
От: tutiluren@tutanota.com
Дата: