public inbox for [email protected]help / color / mirror / Atom feed
Re: List of encodings 3+ messages / 2 participants [nested] [flat]
* Re: List of encodings @ 2026-04-19 20:27 Igor Korot <[email protected]> 2026-04-19 21:21 ` Re: List of encodings Adrian Klaver <[email protected]> 2026-04-19 22:09 ` Re: List of encodings Igor Korot <[email protected]> 0 siblings, 2 replies; 3+ messages in thread From: Igor Korot @ 2026-04-19 20:27 UTC (permalink / raw) To: David G. Johnston <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> Hi, David, On Sat, Apr 18, 2026 at 2:19 AM David G. Johnston <[email protected]> wrote: > > On Friday, April 17, 2026, Igor Korot <[email protected]> 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. ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: List of encodings 2026-04-19 20:27 Re: List of encodings Igor Korot <[email protected]> @ 2026-04-19 21:21 ` Adrian Klaver <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: Adrian Klaver @ 2026-04-19 21:21 UTC (permalink / raw) To: Igor Korot <[email protected]>; David G. Johnston <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> On 4/19/26 1:27 PM, Igor Korot wrote: > Hi, David, > > On Sat, Apr 18, 2026 at 2:19 AM David G. Johnston > <[email protected]> wrote: >> >> On Friday, April 17, 2026, Igor Korot <[email protected]> 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... Not if you read the docs: https://www.postgresql.org/docs/current/catalog-pg-conversion.html "The catalog pg_conversion describes encoding conversion functions. See CREATE CONVERSION for more information." https://www.postgresql.org/docs/current/sql-createconversion.html "Conversions that are marked DEFAULT can be used for automatic encoding conversion between client and server. To support that usage, two conversions, from encoding A to B and from encoding B to A, must be defined." > > 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. > > -- Adrian Klaver [email protected] ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: List of encodings 2026-04-19 20:27 Re: List of encodings Igor Korot <[email protected]> @ 2026-04-19 22:09 ` Igor Korot <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: Igor Korot @ 2026-04-19 22:09 UTC (permalink / raw) To: David G. Johnston <[email protected]>; Tom Lane <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]> Hi, ALL, My question comes from the fact that "Character Set", LC_COLLATE and LC_CTYPE can be used here: https://www.postgresql.org/docs/18/sql-createdatabase.html However its a little bit confusing. The character set should define the collate and the CType things. But according to the docs it looks like its vice versa. Also, there is no reference on where do I get the corresponding values for LC_COLLATE and LC_CTYPE. Thank you, On Sun, Apr 19, 2026 at 3:27 PM Igor Korot <[email protected]> wrote: > > Hi, David, > > On Sat, Apr 18, 2026 at 2:19 AM David G. Johnston > <[email protected]> wrote: > > > > On Friday, April 17, 2026, Igor Korot <[email protected]> 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. ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-04-19 22:09 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-04-19 20:27 Re: List of encodings Igor Korot <[email protected]> 2026-04-19 21:21 ` Adrian Klaver <[email protected]> 2026-04-19 22:09 ` Igor Korot <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox