| From: | Igor Korot <ikorot01(at)gmail(dot)com> |
|---|---|
| To: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Choosing default collation/ctype |
| Date: | 2026-05-03 19:52:18 |
| Message-ID: | CA+FnnTyJDvLijfizguNahiRO1LMHR4t9=_9-aO8P18cDZ6RRGA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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.
Please advise.
Thank you.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ron Johnson | 2026-05-03 20:09:14 | Re: Choosing default collation/ctype |
| Previous Message | Thiemo Kellner | 2026-05-03 19:38:59 | Re: Tablespace size in TB |