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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dionisis Kontominas <dkontominas(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
Date: 2023-02-05 23:24:40
Message-ID: 2550995.1675639480@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dionisis Kontominas <dkontominas(at)gmail(dot)com> writes:
> 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?.

Well, it won't crash or anything, but sorting will be according
to byte-by-byte values. So the sort order of non-ASCII text is
likely to look odd. How much do you care about that?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dionisis Kontominas 2023-02-05 23:36:54 Re: Question regarding UTF-8 data and "C" collation on definition of field of table
Previous Message Dionisis Kontominas 2023-02-05 23:08:28 Question regarding UTF-8 data and "C" collation on definition of field of table