From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pandora <yeyukui@qq.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: whether I can add a new encoding?
Date: Thu, 21 Sep 2023 11:29:27 -0400
Message-ID: <704880.1695310167@sss.pgh.pa.us> (raw)
In-Reply-To: <tencent_8994D08BCF25676E16FAF259343CB149ED09@qq.com>
References: <tencent_8994D08BCF25676E16FAF259343CB149ED09@qq.com>
"=?ISO-8859-1?B?UGFuZG9yYQ==?=" <yeyukui@qq.com> writes:
> The pg_wchar.h file comments "We must avoid renumbering any backend encoding 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, yeyukui@qq.com
Subject: Re: whether I can add a new encoding?
In-Reply-To: <704880.1695310167@sss.pgh.pa.us>
References: <tencent_8994D08BCF25676E16FAF259343CB149ED09@qq.com> <704880.1695310167@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox