thank you for your reply. Changing the collation order and CTYPE did not change the behavior. 名前 | 所有者 | エンコーディング | 照合順序 | Ctype(変換演算子) | アクセス権限 -----------+---------+------------------+-------------+-------------------+--------------------- D209007 | D209007 | UTF8 | C | C | postgres | D209007 | UTF8 | C | C | template0 | D209007 | UTF8 | C | C | =c/D209007 + | | | | | D209007=CTc/D209007 template1 | D209007 | UTF8 | C | C | =c/D209007 + | | | | | D209007=CTc/D209007 template2 | D209007 | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | (5 行) D209007=# \c template2 データベース"template2"にユーザ"D209007"として接続しました。 template2=# select char_length(U&'\+0000E6' || U&'\+000300'); char_length ------------- 2 (1 行) template2=# select char_length(U&'\+008FBA' || U&'\+0E0102'); char_length ------------- 2 (1 行) template2=# select length(U&'\+008FBA' || U&'\+0E0102'); length -------- 2 (1 行) Moto. From: Michel SALAIS <msalais@xxxxxxx> Hi, I think this has something to do with collation and ctype. As I see you have it set to “C” for all your databases (even if I don’t understand your titles 😊). Michel SALAIS De : 荒井元成 <n2029@xxxxxxxxxxxxx> thank you for your reply. It will be 2 characters. select char_length(U&'\+008FBA' || U&'\+0E0102'); char_length ------------- 2 (1 行) select length('辺󠄂'); length -------- 2 (1 行) select char_length('辺󠄂'); char_length ------------- 2 (1 行) $ psql -l データベース一覧 名前 | 所有者 | エンコーディング | 照合順序 | Ctype(変換演算子) | アクセス権限 -----------+---------+------------------+----------+-------------------+--------------------- D209007 | D209007 | UTF8 | C | C | postgres | D209007 | UTF8 | C | C | template0 | D209007 | UTF8 | C | C | =c/D209007 + | | | | | D209007=CTc/D209007 template1 | D209007 | UTF8 | C | C | =c/D209007 + | | | | | D209007=CTc/D209007 (4 行) $ cat pgdata/PG_VERSION 13 Moto. From: David G. Johnston <david.g.johnston@xxxxxxxxx>
Try char_length(text) instead. David J. |