Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows. - Mailing list pgsql-bugs

From tutiluren@tutanota.com
Subject Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
Date
Msg-id MD2KPUN--3-2@tutanota.com
Whole thread Raw
In response to pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.  (tutiluren@tutanota.com)
Responses Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
List pgsql-bugs
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?

pg_dump --format plain --verbose --file "testdump.txt" --exclude-table-data="\"Test schäma\".\"Test täble\"" --host="localhost" --port="5432" --username="postgres" --dbname="test"

The '--dbname="test"' part suggests to me that I'm not connecting to "postgres" or involving it in any way. So why does it (apparently) have something to do with these bizarre errors which only happen if I have the PGCLIENTENCODING set to UTF8 but not WIN1252? My test database is verified UTF8.

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.