Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcHcW-0007Ik-0z for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Dec 2018 22:25:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gcHcU-0000En-Mz for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Dec 2018 22:25:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcHcU-0000Ee-H7 for pgsql-bugs@lists.postgresql.org; Wed, 26 Dec 2018 22:25:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcHcN-0004MI-RF for pgsql-bugs@lists.postgresql.org; Wed, 26 Dec 2018 22:25:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wBQMPToP023677; Wed, 26 Dec 2018 17:25:29 -0500 From: Tom Lane To: yusuke.sonomura@jp.fujitsu.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15566: can't insert money type In-reply-to: <15566-83ad6aef2ac40aa7@postgresql.org> References: <15566-83ad6aef2ac40aa7@postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Tue, 25 Dec 2018 00:42:57 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23675.1545863129.1@sss.pgh.pa.us> Date: Wed, 26 Dec 2018 17:25:29 -0500 Message-ID: <23676.1545863129@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= writes: > -Issue > I can't INSERT numeric data to money column on Solaris. > And I can't understand what error message says. I think codeset should be > "UTF-8". > --How to reproduce > export LANG=ja_JP.UTF-8 > initdb --encoding="UTF-8" --locale="ja_JP.UTF-8" --lc-collate="C" > --lc-ctype="C" --lc-messages="ja_JP.UTF-8" --lc-monetary="ja_JP.UTF-8" > --lc-numeric="ja_JP.UTF-8" --lc-time="ja_JP.UTF-8" -D inst1 Hm. I think you're shooting yourself in the foot by specifying --lc-ctype="C"; in the locale world, that setting is what determines the character encoding. If you want to use UTF8 then LC_CTYPE had better match that. This combination of LC_xxx settings does seem to work more or less sanely on glibc, but it doesn't surprise me that it doesn't work on Solaris. > --Output I got > 2018-12-21 22:15:41.389 JST [8295] WARNING: could not determine encoding > for locale "ja_JP.UTF-8": codeset is "646" > WARNING: could not determine encoding for locale "ja_JP.UTF-8": codeset is > "646" I suppose "646" here refers to ISO 646, which is basically ASCII. Maybe we should recognize codeset "646" as a synonym for PG_SQL_ASCII. But I have a feeling that that'd just leave you with some other, even less decipherable failure later, given this combination of LC_xxx settings. regards, tom lane