G
G
Gruzchick2019-08-13 09:17:10
PostgreSQL
Gruzchick, 2019-08-13 09:17:10

What are the criteria for choosing a locale for a postgresql database?

I am a newbie with no experience. Now I'm learning to work with pstgresql, reading the documentation. I can not understand what locale to set, and what it affects.
1. Let's say if I'm making a multilingual application, what locale should I choose? Or should each language have its own database?
2. What is special about POSIX locales?
3. What can it affect in general?
4. What are the possible problems in the future if you make a bad choice?
UPD: I don't mean encodings, but what concerns the LC_COLLATE and LC_CTYPE parameters

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2019-08-13
@rPman

Multilingual - without options, choose a subset of unicode better than utf8 or the same utf 16/32 (the latter is cool and even has a negligible advantage in processing speed outside the database but a much larger overhead in terms of disk space)
The only reason why you might need 1-byte encodings, this is an attempt to save on the disk space occupied - two or three times, if we are talking about a database consisting entirely of texts, but the crap that you will find when working with them is much more expensive.
Also, utf8 is the easiest for client applications to work with, as support is better. If you're on windows (not web) you might be tempted to use its native UTF-16LE encoding,.. don't be fooled ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question