Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux