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

From: tutiluren(at)tutanota(dot)com
To: Pgsql Bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.
Date: 2020-07-26 23:06:12
Message-ID: MDCN5X---3-2@tutanota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> Also, diff-ing two files with mismatched encodings is not going to work as expected.
>
>
I used WinMerge and visually saw how the "COPY" command was "cut off". It truly had not copied the data. Maybe the error code was "error", but that's what the dumped file looked like. I'm not making this up.

> If you see this error, then PGCLIENTENCODING=1252 will not be a viable workaround
>
Since it skips huge amounts of the data in the database, it's not viable, no... And it never made any sense in the first place, since the database is UTF-8 and everything is UTF-8...

> activate the beta UTF8 support of the Windows Regional settings
>
"Beta UTF8 support"? Regional settings? Nothing other than pg_dump has these problems, yet it's somehow Windows' fault? pg_dump is the program that either errors out or silently ignores data. It's not Windows/cmd.exe not sending the right table/schema names...

To prove my point, also to myself, I opened up a normal cmd.exe, without even using any /U flag, and ran:

php test.php --exclude-table-data="\"Test ❆ schäma\".\"Test ❆ täble\""

My test.php simply outputs the value of the "--exclude-table-data" parameter. Guess what it outputs?

"Test ❆ schäma"."Test ❆ täble"

So, evidently, the standard cmd.exe has no problems sending non-ANSI characters or double quotes to a program/script. Or even to output them (at least in this case). In other words: since my own script receives the Unicode chars and the double quotes, pg_dump also should, unless there's some issue with it. Unless I'm still not understanding what you're saying.

> or access your database from a system with true UTF8 terminal support.
>
I don't have a random system just lying around, ready to migrate my entire "life" machine to. If that were the case, this world would look very different from what it is, and I would have finally have an alternative to this nightmare OS. (No, Linux is not an alternative. I've spent the last 20 years regularly coming back to Windows due to the neverending problems with literally *everything* in Linux/Unix... even considering how horrible Windows is. Which is quite a feat. Please don't think I'm defending modern Windows for one second.)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-07-27 00:24:09 BUG #16556: The database cluster initialisation failed - Win 10 postgresql 12.3 version installation error
Previous Message tutiluren 2020-07-26 22:28:00 Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.