1

I need to use collation from YugabyteDB and has a few questions on how collation works in YugabyteDB -

  1. Does YugabyteDB support all the functionality from Postgres? Is the support up to date with collation from Postgres?
  2. For example, case and accent insensitive, deterministic vs non-deterministic supported? How do you handle a tie-breaker?
  3. I see collation in create type and create database - https://docs.yugabyte.com/latest/api/ysql/the-sql-language/statements/ddl_create_type/ But don’t see any examples of how it works? What collation provider you support (ICU preferred over libc) on what OS?

1 Answers1

3

Currently Yugabyte does not support column collation yet. However there is an active project to introduce collation support into YSQL. Because YSQL is still based on PostgreSQL version 11.2 which only supports deterministic collations, the plan is to first support deterministic collations in YSQL. The tie-breaker is only used by deterministic collations. Once YSQL is synced up to PostgreSQL version 12 or version 13, YSQL will also be enhanced to support non-deterministic collations. Case and accent insensitive collations are only possible when collations are non-deterministic. Therefore in the first implementation in YSQL which is based on PostgreSQL version 11.2 they will not be supported. In the on-going YSQL collation project, both libc and ICU will be supported. However for libc there will only support the basic collations: C, POSIX, ucs_basic, and en_US.utf8. This restriction has several reasons among which: (1) it was said ICU has better support than libc (e.g., fewer bugs) and it appears that in general ICU is the trend; (2) Yugabyte has a restricted centos linuxbrew libc and it only has those basic collations included so to be consistent across centos and mac, libc collations are restricted to only those basic ones.

myang_yb
  • 46
  • 1