Book a Demo

Author Topic: Postgress repository-how to create db with collation case insensitive?  (Read 6128 times)

roman104

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • Right Information - In Right Time - for Right Role
    • View Profile
    • Right Information - In Right Time - for Right Role
Hi,
I am force to use Postgress as DBMS repository. I am using MySQL for many years. I would like to use search with case insensitive setting.
Do You have experience how to create DB in Postgress with collation case insensite, similar like in MS SQL?
Thank You
Roman

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Postgress repository-how to create db with collation case insensitive?
« Reply #1 on: September 18, 2019, 07:45:03 am »
In case you don't get an answer here you could ask that on StackOverflow...

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Postgress repository-how to create db with collation case insensitive?
« Reply #2 on: September 06, 2021, 11:14:43 pm »
Hi,

Reopening this topic, in my case Postgres case sensitivity impacts EA searches, which is an issue for a client.

Using Postgres 12 , we created a case insensitive collation:
CREATE COLLATION case_insensitive (
 provider = icu,
 locale =
'@colStrength=secondary',
 deterministic = false

I then updated the SQL script to create the tables e.g. object_type varchar(255) COLLATE "case_insensitive",

Running a query with the equal operator works ok e.g. name = 'class' returns Class, CLASS and class. However queries using the "like" operator generates the following error:
nondeterministic collations are not supported for like

Looking at Stackoverflow posts, I don't see any solution.

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com