From: Tom Lane <tgl@sss.pgh.pa.us>
To: yusuke.sonomura@jp.fujitsu.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15566: can't insert money type
Date: Wed, 26 Dec 2018 17:25:29 -0500
Message-ID: <23676.1545863129@sss.pgh.pa.us> (raw)
In-Reply-To: <15566-83ad6aef2ac40aa7@postgresql.org>
References: <15566-83ad6aef2ac40aa7@postgresql.org>
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, yusuke.sonomura@jp.fujitsu.com
Subject: Re: BUG #15566: can't insert money type
In-Reply-To: <23676.1545863129@sss.pgh.pa.us>
References: <15566-83ad6aef2ac40aa7@postgresql.org> <23676.1545863129@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox