BUG #15230: "Logical decoding" is not sensitive to client encoding setting

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: hillel(dot)eilat(at)attunity(dot)com
Subject: BUG #15230: "Logical decoding" is not sensitive to client encoding setting
Date: 2018-06-05 08:29:11
Message-ID: 152818735197.26724.16299315668820383342@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15230
Logged by: Hillel Eilat
Email address: hillel(dot)eilat(at)attunity(dot)com
PostgreSQL version: 9.4.4
Operating system: Windows 7
Description:

Logical Decoding is not sensitive to Client character encoding setting

My project uses Logical Decoding by interacting with the WAL backend via
native non-SQL interface.
The plugin used is the common "test_decoding", which is shipped together
with the kit.
There is a Japanese database for which encoding is defined as ""EUC_JP".
Ordinarily - we process the streamed data in UTF8 client encoding - thus
maintaining a common general "consumer" functions.
Consequently, prior to issuing PQconnectdbParams(keywords, values, true) - a
{"client_encoding","UTF8"} couple is introduced.
To be on the safe side - a couple of PQclientEncoding(pConn) /
pg_encoding_to_char(iClientEncoding) is issued thereafter,
for approving that UTF8 was properly set.

Despite the above setting , data which is streamed in does not show up in
UTF8.
It preserves the backend server EUC_JP encoding.

This must be a bug.
One would expect that decoded data which is treamed in should be subjected
to client encoding.

Your assistance will be appreciated.

Regards

Hillel.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Steven Winfield 2018-06-05 10:06:27 RE: BUG #15228: pgbench custom script numbering off-by-one
Previous Message Thomas Kellerer 2018-06-05 06:19:01 Re: JDBC Driver42.2.2 throws error when dealing with money datatype