Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWH71-002iYU-I4 for pgsql-admin@arkaria.postgresql.org; Wed, 16 Aug 2023 14:03:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qWH70-0072Pl-8o for pgsql-admin@arkaria.postgresql.org; Wed, 16 Aug 2023 14:03:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWH6z-0072Pc-Tn for pgsql-admin@lists.postgresql.org; Wed, 16 Aug 2023 14:03:02 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWH6x-000SBK-Bf for pgsql-admin@lists.postgresql.org; Wed, 16 Aug 2023 14:03:00 +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 37GE2tqA1320634; Wed, 16 Aug 2023 10:02:55 -0400 From: Tom Lane To: "James Pang (chaolpan)" cc: "pgsql-admin@lists.postgresql.org" Subject: Re: inserts bypass encoding conversion In-reply-to: References: Comments: In-reply-to "James Pang (chaolpan)" message dated "Wed, 16 Aug 2023 07:06:51 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1320632.1692194575.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 16 Aug 2023 10:02:55 -0400 Message-ID: <1320633.1692194575@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "James Pang (chaolpan)" writes: > With client_encoding=3DUTF8 and server_encoding=3DLATIN1, looks like = insert into value with chr(codepoint) bypass encoding conversion , is it e= xpected ? test as below , The chr() function is a server-side operation that has nothing to do with the client encoding. regards, tom lane