Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2Gib-0008J7-R5 for pgsql-bugs@arkaria.postgresql.org; Thu, 25 May 2023 19:33:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q2GiZ-0007FJ-Cv for pgsql-bugs@arkaria.postgresql.org; Thu, 25 May 2023 19:33:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2GiZ-0007F9-4n for pgsql-bugs@lists.postgresql.org; Thu, 25 May 2023 19:33:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q2GiW-001ryD-HK for pgsql-bugs@lists.postgresql.org; Thu, 25 May 2023 19:33:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 34PJXe9v1564677; Thu, 25 May 2023 15:33:40 -0400 From: Tom Lane To: gdo@leader.it cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG In-reply-to: <17946-3e84cb577e9551c3@postgresql.org> References: <17946-3e84cb577e9551c3@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 25 May 2023 15:21:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1564675.1685043220.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 25 May 2023 15:33:40 -0400 Message-ID: <1564676.1685043220@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > After upgrading an application using Postgresql from version 10 to 12, > fields of type "money" are no longer generated with the =E2=82=AC symbol= but with > $. Hmm, seems to work for me: $ psql psql (12.15) Type "help" for help. postgres=3D# SET lc_monetary TO 'en_GB.UTF-8'; SET postgres=3D# SELECT 12.34::money AS price; price = -------- =C2=A312.34 (1 row) postgres=3D# DO LANGUAGE 'plperl' $$ my $rv =3D spi_exec_query(q{SELECT = 12.34::money AS price;}, 1);elog(NOTICE, $rv->{rows}[0]->{price});$$; NOTICE: =C2=A312.34 DO postgres=3D# SET lc_monetary TO 'it_IT.UTF-8'; SET postgres=3D# SELECT 12.34::money AS price; price = --------- =E2=82=AC 12,34 (1 row) postgres=3D# DO LANGUAGE 'plperl' $$ my $rv =3D spi_exec_query(q{SELECT = 12.34::money AS price;}, 1);elog(NOTICE, $rv->{rows}[0]->{price});$$; NOTICE: =E2=82=AC 12,34 DO IIRC, we've seen trouble in the past with some versions of libperl clobbering the host application's locale settings. Maybe you have a plperl.on_init or plperl.on_plperl_init action that is causing that to happen? In any case, I'd call it a Perl bug not a Postgres bug. regards, tom lane