Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wJd86-00059f-26 for pgsql-general@arkaria.postgresql.org; Sun, 03 May 2026 20:09:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wJd84-004VTH-1B for pgsql-general@arkaria.postgresql.org; Sun, 03 May 2026 20:09:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wJd84-004VT9-01 for pgsql-general@lists.postgresql.org; Sun, 03 May 2026 20:09:28 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wJd81-000000001xs-2MpU for pgsql-general@lists.postgresql.org; Sun, 03 May 2026 20:09:26 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-42fdab683b7so1830567fac.3 for ; Sun, 03 May 2026 13:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777838965; cv=none; d=google.com; s=arc-20240605; b=IHuFW097ApAymYwXbJCVBwo77/rm3SVd9AFqTAUTJB87dJLkGfVJgsuYJ8rF8gjNh6 jXvz95wUqEhkkN01CceW4H45XVZIFyNrBDpR/evxLet5PZrdNsizw5a7rXjSk2e7aEGn 4bH3HL0A8llwbAVE8xatzkVCg8KlK3N5XX4qNgbFuudrm5jsB4q6hDOGQVdaX2ypNp5b JikDSKwJqwpgItGOWL+TiyRMDVk20TpgmjnHEJfF5e9Al6HChj3D9DNVb/wPrvw9RkDH 66IZjmzfY8TO+mGvtyqVsuaQRlhNEIhQU2hozm+tZ0E9KHdr/BANZT7g+bFC5GQcO/i0 84uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iFxc9eBbzjHUO65htNj/tCO0qn57tLhp8kjygtAFNGY=; fh=2DoGC78b0mi8uZ4UY+9ocPF86GSVzeaJWqou/x907js=; b=h4jj3yGnpUqrfcB5NJTp73YXCiZp1T+cvxvifIxKJiGUM7FCpdLXUydzHpB0Q1Cc6G 27pVeYypgO9sQNoPtL6dzaBzBRlsbGGAhfiXye6ZXNhHJIB5kxG3jTAnMZC1LI9A+BDC jDvGdbUbd03VvJpym6SNbmiRa/zynGaryRTfFZKziF6I5zTT+i4iE2Gnfd/OrEVnNTbk kmwvQ8VnWz48e2FoFeTV+MpcQdJElX5dYiA8CfbaH5l6ZKV9krEF+t/w4VeyxvCi/Uqr /t7N6DnzKLT/uItHRlbMKR8Jnz7zMvUucTsh13gWLLMjrZuSKPcnXTJIf0GiXC0fwmqw Uriw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777838965; x=1778443765; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=iFxc9eBbzjHUO65htNj/tCO0qn57tLhp8kjygtAFNGY=; b=LWneSEdssqkhyjKDaMqMGL0HlqHR/qIsN8BBRrxcHWNgL/ImCbpl7qwxGpgHf0DLJL KvKRVAfUFcmS7A+PXPsEbmPbjSpoWwpU+FyyTjlvg73EHk5Ok3jjEqiN5YIdvyycc64N 99Z78zv4GJSkdJbfEV4+ZSekG5Xr0AE+uucQPRTDNTVqD8nqZcxvoN+luQG2Ulf+l5xI R2hJQd/IK5aP+jUo8x9Z0hCnyW4Ig7i+WNsrSWrmHHri7oTZZO8T6Oqik3FjGCjf/5wm JNHPbyEi3+CP0RyrAORzWfil/TGPQhH1EOewIc1uuGLIveHe2DYBPvWRy5mKbYcA6w83 LDjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777838965; x=1778443765; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iFxc9eBbzjHUO65htNj/tCO0qn57tLhp8kjygtAFNGY=; b=Rk75qY8XVOcVcxCm+hTMGJBccG0Su6gZvnNFJN/5HQDpu0o3FSq3gbqywbNIOBfR1/ f8x+DhfvYibrl9QMTmossRk/5GII+C4dTGj7aSGec47dGuePKQdhJTZ6iuk0/sN3uKiQ wk4K4ic3sdW035G6C8tfttsAZ8J9ib1I7j51Bn570cyb3y94yfD2kKfNlv/sRz/BBEVI XUfcoa5I+60bh6XA0FUm1iVMBPByksLu7CWBLgl6k1Ki9IHfSVeHYdkYIHzlCUUQwkmA 77n57I6SaGOlcD0AGuHOH2iXzt11zRLZTcwKoZVjBHaelSwQMj6H0dDh9N55vtmPzRaj GJ6A== X-Gm-Message-State: AOJu0YweaCWhr1AD1pxwiqIo+BLh0uBWhQ1XvcllPQYQVsX6xyOQ2IZ+ 0FqmriGpbmiIAQE59B9v1x4voT1sYKcD4NQrF5aryCVqBmglcnhUHDOOUZmCb0+f79w3/RL08fH QF1uyDg89J3RX3ABqMl2BOCuf3WKgO9URLg== X-Gm-Gg: AeBDievyb09pU5+MF9uRpgfNyWPQC2184IPOZAJSCOMmFpNYpUwEultRuahoZdz4Uqd 84w4lLbJbC8hy0QRlNCP9CmSHKidbqVnXauOhAXpc2RJrzBhsg464CICS12yCqPuJ/Xq751syJc +neot8l2PjPRENlQl0CF2mIW9pzFyHHuf/xrlu8He5AkPj9jzGYKuomIJWkmIZXGll1/FLDF8Mc RqiJUW/t+GHkjvqWPJH7A6jWW5xjFkCZx7UVv/KZXL03ei0fYsjMOcCLjI9wsukaNfUffpaV5CU yb3C5B+4EE7HvSKyRXY= X-Received: by 2002:a05:6870:959b:b0:42f:e146:6e39 with SMTP id 586e51a60fabf-43475fdb519mr3427260fac.1.1777838965224; Sun, 03 May 2026 13:09:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Sun, 3 May 2026 16:09:14 -0400 X-Gm-Features: AVHnY4KbNn-ZoDwJHP782rvgCPRpSQqZbAyKwusehLGdAlYKEtCkarbI8XtMoJw Message-ID: Subject: Re: Choosing default collation/ctype To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000fd7d3b0650ef634c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fd7d3b0650ef634c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, May 3, 2026 at 3:52=E2=80=AFPM Igor Korot wrot= e: > Hi, ALL, > In the CREATE DATABASE statement I can use encoding/collation/ctype. > > I can retrieve the encoding list with: > > [code] > SELECT pg_encoding_to_char( conforencoding ) AS name FROM pg_conversion > [/code] > > And then I can get a list of collations/ctypes with: > > [code] > SELECT collname, collencoding, collprovider collctype FROM pg_collation > [/code] > > And then add a logic in my UI to switch collations/ctypes based on > encoding. > > However, what I wonder is: > > Is there a way to select a default collation/ctype for a specific encodin= g? > > Or maybe I'm overthinking it and I should let the user choose and if > nothing - just keep those 2 as "Default" and let the server pick it > up. However it will be weird, especially from me as a user POV. > You know your data, not us. The first question I'd try to is "how much client text data is not compatible with bog-standard UTF8?" --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000fd7d3b0650ef634c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, May 3, 2026 at 3:52=E2=80=AFPM Ig= or Korot <ikorot01@gmail.com&g= t; wrote:
Hi, ALL,
In the CREATE DATABASE statement I can use encoding/collation/ctype.

I can retrieve the encoding list with:

[code]
SELECT pg_encoding_to_char( conforencoding ) AS name FROM pg_conversion
[/code]

And then I can get a list of collations/ctypes with:

[code]
SELECT collname, collencoding, collprovider collctype FROM pg_collation
[/code]

And then add a logic in my UI to switch collations/ctypes based on encoding= .

However, what I wonder is:

Is there a way to select a default collation/ctype for a specific encoding?=

Or maybe I'm overthinking it and I should let the user choose and if nothing - just keep those 2 as "Default" and let the server pick = it
up. However it will be weird, especially from me as a user POV.

You know your data, not us.=C2=A0 The first questi= on I'd try to is "how much client text data is not compatible with= bog-standard UTF8?"

--
Death to <Redacted>, and butter sauce.
Don't b= oil me, I'm still alive.
<Redacted> lobster!
--000000000000fd7d3b0650ef634c--