pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
Date: Sun, 5 Feb 2023 18:57:13 -0600
Message-ID: <8c0e7312-a30a-074a-cdb6-32923a59d72d@gmail.com> (raw)
In-Reply-To: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com>
References: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com>

Why are you specifying the collation to be "C" when the default db encoding 
is UTF8, and UTF-8 has Greek, Chinese and English encodings?

On 2/5/23 17:08, Dionisis Kontominas wrote:
> 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

-- 
Born in Arizona, moved to Babylonia.





view thread (11+ messages)  latest in thread

Message-ID: <8c0e7312-a30a-074a-cdb6-32923a59d72d@gmail.com>
Permalink:  ../8c0e7312-a30a-074a-cdb6-32923a59d72d@gmail.com/
Also on:    postgresql.org/message-id/8c0e7312-a30a-074a-cdb6-32923a59d72d@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
  In-Reply-To: <8c0e7312-a30a-074a-cdb6-32923a59d72d@gmail.com>
  References: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com> <8c0e7312-a30a-074a-cdb6-32923a59d72d@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox