Re: Question regarding UTF-8 data and "C" collation on definition of field of table
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Question regarding UTF-8 data and "C" collation on definition of field of table |
| Дата | |
| Msg-id | 2564482.1675647025@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Question regarding UTF-8 data and "C" collation on definition of field of table (Dionisis Kontominas <dkontominas@gmail.com>) |
| Список | pgsql-general |
Dionisis Kontominas <dkontominas@gmail.com> writes:
> 1. Regarding the different languages in the same column, that is normal
> if the column is a UTF-8 one, i.e. should be able to hold for example
> English, Greek and Chinese characters. In this case what is the best
> approach to define the collation and lctype of the column? Either C
> or ucs_basic maybe or something else or it does not matter, the characters
> would be stored correctly as long as the database is UTF8 encoding?
The characters will be stored correctly, yes. Collation only affects
sort order. Ctype affects some other functions like upper/lowercase
folding and what is considered a "letter" in regexps. If you use "C"
for lc_ctype then only ASCII letters will be folded or recognized as
letters.
> 2. Is there a real difference between C and ucs_basic collation/lctype?
No, at least not in Postgres.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера