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 1q7e5G-0001cU-FP for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jun 2023 15:31:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7e5F-00064f-Bj for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jun 2023 15:31:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7e5E-00064F-WD for pgsql-bugs@lists.postgresql.org; Fri, 09 Jun 2023 15:31:25 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q7e57-001F1Q-KQ for pgsql-bugs@lists.postgresql.org; Fri, 09 Jun 2023 15:31:24 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-39a523e8209so692272b6e.0 for ; Fri, 09 Jun 2023 08:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon-tech.20221208.gappssmtp.com; s=20221208; t=1686324676; x=1688916676; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UMF5+lsRv2Dt8W9zhH3l1obfg7tnkBMhcGGkFfMk4kw=; b=P8I/H55x1bS+H/d7EZFx869ux6gPNQjepthYiiICzi/DvAN7KiRWbxBqwcfzcZK7zX 67xF+qeE+UL7hJZVqPQPTW+fI8p2jtjCzC4UI3fh9IHGrIEyhcoHq1OMeCAkKEqCR/1f uIeR+Mdmcd4QLFgPC4VZ16B2fA9vpZbJWpknSkUU8xNzBwThZuAJl8LYaatZaWCgfpUL lKNQC7XnCKNVuGNx4egTKOMz+93P/YLcXVix/ak84IyIGspFbBSEFlbIEkfgnpO6iiyT SanzSM+LE8OGqB49jGU5T618egM/aYVffFGxPrenJzw25lahunhbv0erRvsM8yHZiles PhoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686324676; x=1688916676; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=UMF5+lsRv2Dt8W9zhH3l1obfg7tnkBMhcGGkFfMk4kw=; b=GwymZG4CPnPpNFc9srBRExI4MpqJsC92F8zAdw7vF+qpSVKmOzp9Eye3SnLJlnNOJ3 yPB+gT0BdpgTyJvzJ88u6niJBEgGOlVAMoMtu5eZDp+LFpQ2SMGb5eAmM/CMYOwzBd/d IGcJMeeauBeg0Dbf64hOOw55L/LPspImoAwLCWDlMmpDt5gpngz+49UwFuVgfmeSwedr nbXxO6CwzeMmLicbeLMu8dStjEC762kdIKCQM2k06fWvexTMojCDJXlyG7bXmgq3LFts 5Qiik8OKrGzLaEyD2u/Bf1XMCr8rpSdnc0BlSkLngwNPDfxyCjn5SfAz+027+33NT6GO kuLw== X-Gm-Message-State: AC+VfDzuyjUlzbuFXORit5HkwDTg7vBeHeL1xvAUy4K/+5P2YmMMEZb8 WuYa4m93d66Da6PlBwNvyxxyUA== X-Google-Smtp-Source: ACHHUZ5McYaUwuPCBsq7M3ysQkiGa4HE7gaZtLnzrEfQhuoQm8JvqpC8KNxn2Bm1uCtaaoxDKaZKPw== X-Received: by 2002:a05:6808:1787:b0:398:459f:1fd7 with SMTP id bg7-20020a056808178700b00398459f1fd7mr2076942oib.20.1686324675965; Fri, 09 Jun 2023 08:31:15 -0700 (PDT) Received: from localhost ([2607:fb90:e696:c1dc:3996:e070:71ee:42fb]) by smtp.gmail.com with ESMTPSA id o127-20020acad785000000b0039c8a62cadasm1387747oig.19.2023.06.09.08.31.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jun 2023 08:31:15 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 09 Jun 2023 10:31:14 -0500 Message-Id: Cc: Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG To: "Heikki Linnakangas" , "Tom Lane" , From: "Tristan Partin" X-Mailer: aerc 0.15.2-33-gedd4752268b2 References: <17946-3e84cb577e9551c3@postgresql.org> <1564676.1685043220@sss.pgh.pa.us> <555bb26e-c27c-ab65-028f-3fd5b82df9de@iki.fi> In-Reply-To: <555bb26e-c27c-ab65-028f-3fd5b82df9de@iki.fi> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon Jun 5, 2023 at 11:00 AM CDT, Heikki Linnakangas wrote: > On 25/05/2023 15:33, Tom Lane wrote: > > 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 symb= ol but with > >> $. > >=20 > > Hmm, seems to work for me: > > I can reproduce this: > > psql (16beta1) > Type "help" for help. > > postgres=3D# DO LANGUAGE 'plperl' $$ elog(NOTICE, 'foo') $$; > NOTICE: foo > DO > postgres=3D# SET lc_monetary TO 'en_GB.UTF-8'; > SET > postgres=3D# SELECT 12.34::money AS price; > price > -------- > $12.34 > (1 row) > > > If I don't call the plperl function, it works as expected: > > sql (16beta1) > 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) > > I should note that 'en_GB.UTF-8' is the default locale in my system, and= =20 > that's what I used in initdb. I don't know if it makes a difference. I am looking into this bug. I have also reproduced it. --=20 Tristan Partin Neon (https://neon.tech)