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.96) (envelope-from ) id 1wMFdM-002KeL-0c for pgsql-hackers@arkaria.postgresql.org; Mon, 11 May 2026 01:40:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wMFdK-00FWVJ-2l for pgsql-hackers@arkaria.postgresql.org; Mon, 11 May 2026 01:40:34 +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.96) (envelope-from ) id 1wMFdK-00FWVB-1c for pgsql-hackers@lists.postgresql.org; Mon, 11 May 2026 01:40:34 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wMFdE-00000001CoZ-47qc for pgsql-hackers@lists.postgresql.org; Mon, 11 May 2026 01:40:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=Fbs5mObjekVIc1MkYMWHTjhNbxgLDshF7oniBvPY5B4=; b=lp9vAa6gSpDlWfHYxvcmj3bhjM ArxsqmfA0kAwHRPB5HKf1a9miQBOpIBgBKDeLDnLvd99fluUhlts0oz19AG5P9CAqDHybtDBDWQ5K cnqKHuYfnQUOmDWbv+1azWSmIhuDiKJomOyrMaAiz+TPehfOIHRbLiQqAwggEkQIVBkCeQvfCppdn YwliX3+OFGrrU1cHvZrDMCMtzJdLIGUUmn0eMj7axjGSbjS8do4gIrwnkjDsq+4iswBqmG+5pH/rX rYnIyK7SLz3LK6XMA7MP+pKu5v+Sz41fuID5UjaScGa8t1X9dKdPMjiIGMAxAF3wdB8U2OXQrB4uq Q/ByE/tg==; Received: from [2409:11:4120:300:19c3:e4eb:fcd9:d8b2] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wMFdA-004khZ-1D; Mon, 11 May 2026 01:40:26 +0000 Date: Mon, 11 May 2026 10:40:13 +0900 (JST) Message-Id: <20260511.104013.2069487042346308197.ishii@postgresql.org> To: chenloveit@gmail.com Cc: peter@eisentraut.org, pgsql-hackers@lists.postgresql.org Subject: Re: Proposal: tighten validation for legacy EUC encodings or document that accepted byte sequences may be unconvertible to UTF8 From: Tatsuo Ishii In-Reply-To: References: <30e628b4-03cd-43eb-9ea4-d211aaddcaf5@eisentraut.org> <20260506.211907.1578384907621261702.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:19c3:e4eb:fcd9:d8b2 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> If so, tightening up the validation may break such that uses. > > I agree. What about introducing an extra GUC which allows users to specify > verification logic? In fact, I have implemented this patch. > > ``` > SHOW encoding_validation; > -- default behaviour > SET encoding_validation = 'native'; > -- enforce Write to be fully compatible with Read > SET encoding_validation = 'read_compatible'; -1 for using GUC. These settings may vary depending on the encoding. Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp