public inbox for [email protected]  
help / color / mirror / Atom feed
From: Igor Korot <[email protected]>
To: Ron Johnson <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: List of encodings
Date: Mon, 20 Apr 2026 19:42:18 -0700
Message-ID: <CA+FnnTy2D85znPLd-G47Uyt4RTF289g45XnSXrLQEHG8CeN2qg@mail.gmail.com> (raw)
In-Reply-To: <CANzqJaBRRq5T-3VJc5fzGSOotAW8eXg1cvh0XwoRc4akO+mamg@mail.gmail.com>
References: <CA+FnnTxFMiA+KMfypfGyY43G2kSx6-t5A351snUMmWC-2Lxvaw@mail.gmail.com>
	<CAKFQuwZOH6BPtaWJKr9jRGxdJt05YtLAZn1s_fYt=uzAASm9CQ@mail.gmail.com>
	<CA+FnnTymNs9_3pBci01_Uu5OTNJFngOhu8_khpmUs88V8kX86Q@mail.gmail.com>
	<[email protected]>
	<CA+FnnTzx90AzTu07zVGMCYmvBYs_VsL9k2E7eBkzg_rTRwZbeA@mail.gmail.com>
	<[email protected]>
	<CA+FnnTxJyrnxR0hhV8T8J7Gb=MZ=OrtrEUcyoMf14-WHKgSb-A@mail.gmail.com>
	<CANzqJaBRRq5T-3VJc5fzGSOotAW8eXg1cvh0XwoRc4akO+mamg@mail.gmail.com>

Hi, ALL,


On Sun, Apr 19, 2026 at 8:32 PM Ron Johnson <[email protected]> wrote:
>
>
>
> On Sun, Apr 19, 2026 at 9:13 PM Igor Korot <[email protected]> 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.)

No it does not.

But it has an option that can be chosen and supplied to the command...

So when I write "CREATE DATABASE mydb ECODING = BIG5", what will happen?

Moreover, I'm curious - if I chose "BIG5", there are only number of
available collate/ctype pairs.
How do I choose which one to present to the user.
Because there is not one default "BIG5" - there are 3 default "BIG5"s.

Thank you.

>
> 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!






reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: List of encodings
  In-Reply-To: <CA+FnnTy2D85znPLd-G47Uyt4RTF289g45XnSXrLQEHG8CeN2qg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox