Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bh6mG-0005LQ-J6 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2016 03:10:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bh6mF-0006YG-W5 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2016 03:10:24 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bh6mE-0006XW-Rj for pgsql-hackers@postgresql.org; Tue, 06 Sep 2016 03:10:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bh6mB-0003DU-GB for pgsql-hackers@postgresql.org; Tue, 06 Sep 2016 03:10:22 +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 u863AE7v027599; Mon, 5 Sep 2016 23:10:14 -0400 From: Tom Lane To: "Tsunakawa, Takayuki" cc: "'Tatsuo Ishii'" , "pgsql-hackers@postgresql.org" Subject: Re: Supporting SJIS as a database encoding In-reply-to: <0A3221C70F24FB45833433255569204D1F5E6615@G01JPEXMBYT05> References: <0A3221C70F24FB45833433255569204D1F5E5F9D@G01JPEXMBYT05> <20160905.163854.612818171756520492.t-ishii@sraoss.co.jp> <0A3221C70F24FB45833433255569204D1F5E602E@G01JPEXMBYT05> <9599.1473086835@sss.pgh.pa.us> <0A3221C70F24FB45833433255569204D1F5E6615@G01JPEXMBYT05> Comments: In-reply-to "Tsunakawa, Takayuki" message dated "Tue, 06 Sep 2016 02:51:13 -0000" Date: Mon, 05 Sep 2016 23:10:14 -0400 Message-ID: <27598.1473131414@sss.pgh.pa.us> X-Pg-Spam-Score: -3.0 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org "Tsunakawa, Takayuki" writes: > Using multibyte-functions like mb... to process characters would solve > the problem? Well, sure. The problem is (1) finding all the places that need that (I'd estimate dozens to hundreds of places in the core code, and then there's the question of extensions); (2) preventing new non-multibyte-aware code from being introduced after you've fixed those places; and (3) the performance penalties you'd take, because a lot of those places are bottlenecks and it's much cheaper to not worry about character lengths in an inner loop. > Isn't the current implementation blocking the support of > other character sets that have similar characteristics? Sure, SJIS is not the only encoding that we consider frontend-only. See https://www.postgresql.org/docs/devel/static/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers