pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dionisis Kontominas <dkontominas@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
Date: Sun, 05 Feb 2023 18:24:40 -0500
Message-ID: <2550995.1675639480@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com>
References: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com>

Dionisis Kontominas <dkontominas@gmail.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





view thread (11+ messages)  latest in thread

Message-ID: <2550995.1675639480@sss.pgh.pa.us>
Permalink:  ../2550995.1675639480@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2550995.1675639480@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, dkontominas@gmail.com
  Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
  In-Reply-To: <2550995.1675639480@sss.pgh.pa.us>
  References: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com> <2550995.1675639480@sss.pgh.pa.us>

* 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