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) |
Ответы |
Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
|
Список | pgsql-bugs |
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 commandconnects 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 по дате отправления: