pgsql: Remove MULE_INTERNAL encoding.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove MULE_INTERNAL encoding.
Date: 2026-04-08 05:50:11
Message-ID: E1wALnm-003VN5-0y@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove MULE_INTERNAL encoding.

This was useful before widespread Unicode adoption, and was based on the
internal encoding Emacs used to mix multiple sub-encodings. Emacs
itself has stopped using it, and our implementation hadn't been updated
with modern underlying standards. It is thought to be very unlikely
that anyone is still using it in the field. Since such a complex
encoding comes with costs and risks, we agreed to drop support.

Any existing database using this encoding would need to be dumped and
restored with a new encoding to upgrade to PostgreSQL 19, most likely
UTF8, since pg_upgrade would fail.

Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Reviewed-by: Jeff Davis <pgsql(at)j-davis(dot)com>
Discussion: https://postgr.es/m/CA%2BhUKGKXDXh-FdU0orjfv%2BF08f%3DD91BhV3Ra-4zL-q%2BJmGYqTA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/77645d44e3552ca0690e158ce5c51dc75c4934a4

Modified Files
--------------
doc/src/sgml/charset.sgml | 193 +--------
src/backend/utils/mb/conv.c | 238 -----------
src/backend/utils/mb/conversion_procs/Makefile | 4 +-
.../{latin_and_mic => cyrillic}/Makefile | 8 +-
.../cyrillic_and_mic.c => cyrillic/cyrillic.c} | 144 +------
.../mb/conversion_procs/cyrillic_and_mic/Makefile | 13 -
.../mb/conversion_procs/euc_cn_and_mic/Makefile | 13 -
.../euc_cn_and_mic/euc_cn_and_mic.c | 169 --------
.../euc_jp_and_sjis/euc_jp_and_sjis.c | 448 +--------------------
.../mb/conversion_procs/euc_kr_and_mic/Makefile | 13 -
.../euc_kr_and_mic/euc_kr_and_mic.c | 177 --------
.../mb/conversion_procs/euc_tw_and_big5/big5.c | 3 +-
.../euc_tw_and_big5/euc_tw_and_big5.c | 356 +---------------
.../latin2_and_win1250/latin2_and_win1250.c | 70 ----
.../conversion_procs/latin_and_mic/latin_and_mic.c | 139 -------
src/backend/utils/mb/conversion_procs/meson.build | 5 +-
src/backend/utils/mb/mbutils.c | 6 +-
src/common/encnames.c | 8 -
src/common/wchar.c | 223 ----------
src/include/catalog/pg_conversion.dat | 90 -----
src/include/catalog/pg_proc.dat | 174 +-------
src/include/mb/pg_wchar.h | 198 +--------
src/pl/plpython/plpy_util.c | 4 +-
src/test/mb/expected/mule_internal.out | 333 ---------------
src/test/mb/mbregress.sh | 2 +-
src/test/mb/sql/mule_internal.sql | 72 ----
src/test/modules/test_escape/test_escape.c | 2 -
src/test/regress/expected/conversion.out | 127 ------
src/test/regress/expected/encoding.out | 17 +-
src/test/regress/expected/object_address.out | 4 +-
src/test/regress/expected/xml.out | 4 +-
src/test/regress/expected/xml_1.out | 4 +-
src/test/regress/expected/xml_2.out | 4 +-
src/test/regress/regress.c | 2 +
src/test/regress/sql/conversion.sql | 27 --
src/test/regress/sql/encoding.sql | 11 +-
src/test/regress/sql/object_address.sql | 2 +-
src/test/regress/sql/xml.sql | 4 +-
38 files changed, 56 insertions(+), 3255 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message John Naylor 2026-04-08 06:52:47 pgsql: Exit early from pg_comp_crc32c_pmull for small inputs
Previous Message Andres Freund 2026-04-08 04:09:54 pgsql: instrumentation: Allocate query level instrumentation in Executo