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 1qjLcU-00AWk0-42 for pgsql-general@arkaria.postgresql.org; Thu, 21 Sep 2023 15:29:34 +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 1qjLcS-00D3xT-Og for pgsql-general@arkaria.postgresql.org; Thu, 21 Sep 2023 15:29:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjLcS-00D3xC-Cp for pgsql-general@lists.postgresql.org; Thu, 21 Sep 2023 15:29:32 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjLcP-006Y5M-F7 for pgsql-general@lists.postgresql.org; Thu, 21 Sep 2023 15:29:31 +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 38LFTRRH704881; Thu, 21 Sep 2023 11:29:27 -0400 From: Tom Lane To: "=?ISO-8859-1?B?UGFuZG9yYQ==?=" cc: "=?ISO-8859-1?B?cGdzcWwtZ2VuZXJhbA==?=" Subject: Re: whether I can add a new encoding? In-reply-to: References: Comments: In-reply-to "=?ISO-8859-1?B?UGFuZG9yYQ==?=" message dated "Thu, 21 Sep 2023 17:55:01 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <704879.1695310167.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Sep 2023 11:29:27 -0400 Message-ID: <704880.1695310167@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "=3D?ISO-8859-1?B?UGFuZG9yYQ=3D=3D?=3D" writes: > The pg_wchar.h file comments "We must avoid renumbering any backend enco= ding until libpq's major version number is increased beyond 5", Can I add = a new server-side encoding, GBK18030, and place it after PG_KOI8U in PG10.= 6? What is GBK18030? If it's related to either GBK or GB18030, then it'd be unsafe to use as a server encoding because it's not a strict ASCII superset (that is, it has multibyte characters in which not all bytes have the high bit set). The lack of room for a new server encoding in the pg_enc enum has seemed like a mostly hypothetical problem because of that restriction. regards, tom lane