| From: | Igor Korot <ikorot01(at)gmail(dot)com> |
|---|---|
| To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
| Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: List of encodings |
| Date: | 2026-04-19 20:27:46 |
| Message-ID: | CA+FnnTymNs9_3pBci01_Uu5OTNJFngOhu8_khpmUs88V8kX86Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi, David,
On Sat, Apr 18, 2026 at 2:19 AM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Friday, April 17, 2026, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>>
>> Hi, ALL,
>> Does the list shown in
>> https://www.postgresql.org/docs/current/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED
>> stored somewhere in INFORMATION_SCHEMA?
>
>
> This wouldn’t be under the purview of information schema. You can find pg-specific pieces though:
>
> https://www.postgresql.org/docs/current/catalog-pg-conversion.html
>
> Note the function used to convert ids to names.
Tried the following query:
SELECT conname AS name, pg_encoding_to_char( conforencoding ) AS
encoding, condefault AS default FROM pg_conversion ORDER BY encoding;
and got following results (for simplicity I will post only couple of rows):
big5_to_utf8 | BIG5 | t
big5_to_euc_tw | BIG5 | t
big5_to_mic | BIG5 | t
euc_cn_to_mic | EUC_CN | t
euc_cn_to_utf8 | EUC_CN | t
euc_jis_2004_to_shift_jis_2004 | EUC_JIS_2004 | t
euc_jis_2004_to_utf8 | EUC_JIS_2004 | t
euc_jp_to_mic | EUC_JP | t
euc_jp_to_sjis | EUC_JP | t
euc_jp_to_utf8 | EUC_JP | t
euc_kr_to_utf8 | EUC_KR | t
euc_kr_to_mic | EUC_KR | t
euc_tw_to_big5 | EUC_TW | t
euc_tw_to_utf8 | EUC_TW | t
euc_tw_to_mic | EUC_TW | t
What I noticed is that all encodings are default, as they all have 't'
in the last column.
It's a little confusing...
Thx for the help.
>
>>
>>
>> Or is it hard coded inside the PostgreSQL codebase?
>
>
> Yes. Doesn’t preclude exposing it via SQL but we don’t do so directly.
>
> David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Karsten Hilbert | 2026-04-19 21:03:27 | Re: unique constraint violation on multiple-rows update |
| Previous Message | Tom Lane | 2026-04-19 15:17:47 | Re: unique constraint violation on multiple-rows update |