Re: List of encodings - Mailing list pgsql-general

From Ron Johnson
Subject Re: List of encodings
Date
Msg-id CANzqJaBRRq5T-3VJc5fzGSOotAW8eXg1cvh0XwoRc4akO+mamg@mail.gmail.com
Whole thread
In response to Re: List of encodings  (Igor Korot <ikorot01@gmail.com>)
Responses Re: List of encodings
List pgsql-general


On Sun, Apr 19, 2026 at 9:13 PM Igor Korot <ikorot01@gmail.com> wrote:
[snip]
>
> In your setup all the installed encoding conversion functions are also
> the default for those conversions. It is possible to create/install a
> conversion function that is not the default.

So, let's say I chose "BIG5"".

As stated the table contains:

 big5_to_utf8                   | BIG5           | t
 big5_to_euc_tw                 | BIG5           | t
 big5_to_mic                    | BIG5           | t

Since all 3 are default character sets, which one would be chosen?
(in the context of CREATE DATABASE)

Does CREATE DATABASE convert text?  (I think you might be misunderstanding the purpose of the pg_conversion table.)

Wouldn't it only convert text when a client is inserting text of encoding X into a table with encoding Y?

ISTM that pg_conversion says whether PG knows how to convert from X to Y, not the encoding scheme you defined when creating the db.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: List of encodings
Next
From: Tom Lane
Date:
Subject: Re: List of encodings