citusdata / citusdata/citus

Wrong work with native charset.

Open
#2,033 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

I set up citus cluster with native charset windows -1251, to reduce size of char to 1 byte (in 2 times).
Connect to coordinator.
```
=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+--------------+--------------+-----------------------
electron | olleg | WIN1251 | ru_RU.CP1251 | ru_RU.CP1251 |
=> show client_encoding;
client_encoding
-----------------
UTF8
(1 row)
-- check native names
=> create table "тест" ("тест" text);
CREATE TABLE
-- native values
=> insert into "тест" values ('тест');
INSERT 0 1
=> select * from "тест";
тест
------
тест
(1 row)
-- all fine yet
-- now distribute
=> select create_reference_table('"тест"');
ЗАМЕЧАНИЕ: Copying data from local table...
create_reference_table
------------------------

(1 row)
=> select * from "тест";
тест
----------
тест
(1 row)
--broken charset, lets check node
=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+--------------+--------------+-----------------------
electron | olleg | WIN1251 | ru_RU.CP1251 | ru_RU.CP1251 |
=> show client_encoding;
client_encoding
-----------------
UTF8
(1 row)
=> \d
List of relations
Schema | Name | Type | Owner
--------+-------------+-------+-------
public | тест_102024 | table | olleg
(1 row)
-- names are fine
=> select * from "тест_102024";
тест
----------
тест
(1 row)
-- values not
```
I checked this with binary_master_copy_format on and off, result the same.
Ubuntu 17.10
dpkg -s postgresql-10-citus-7.2
Version: 7.2.1.citus-1
dpkg -s postgresql-10
Version: 10.1-1.pgdg17.04+1

With UTF-8 as database charset all fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.