Question regarding UTF-8 data and "C" collation on definition of field of table

From: Dionisis Kontominas <dkontominas(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Question regarding UTF-8 data and "C" collation on definition of field of table
Date: 2023-02-05 23:08:28
Message-ID: CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I have a question regarding the definition of the type of a character
field in a table and more specifically about its collation and UTF-8
characters and strings.

Let's say that the definition is for example as follows:

name character varying(8) COLLATE pg_catalog."C" NOT NULL

and also assume that the database default encoding is UTF8 and also the
Collate and Ctype is "C"". I plan to store strings of various languages in
this field.

Are these the correct settings that I should have used on creation of
the database?.

Thank you in Advance!

Kindest regards,

Dionisis Kontominas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-02-05 23:24:40 Re: Question regarding UTF-8 data and "C" collation on definition of field of table
Previous Message Erik Wienhold 2023-02-05 23:05:29 Re: Slow down dev database transactions/second for testing?