Case sensitivity #2633
-
A familiar topic, I'm sure. We are researching moving from SQL Server to Postgres. We are currently discussing the topic of case sensitivity and some possible solutions to the situation. We have looked into custom column collations, ILIKE, CITEXT so far as options. Obviously we have much more complex SQL (Application is 20+ years old) that would need to be processed but this gives a simple example. Is this something that could be done at the driver level? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
This automatically happens in postgres. Unless you quote "Foo" it will automatically seen as foo by the backend |
Beta Was this translation helpful? Give feedback.
-
There is no global case insensitivity setting right now, not in the Driver nor in the Server, but as you already mentioned in your research Just as an extra experiment, since PostgreSQL 15 (to be released on October 13, 2022), it allows ICU collations to be set as the default for clusters and databases, the only problem I see, is that it looks like it's not possible to set if a collation is either deterministic or nondeterministic so this might or might not help with your use case, but you need to give PostgreSQL 15 a try to check if it works for you. |
Beta Was this translation helpful? Give feedback.
-
I'm curious what database allows you to do case insensitive predicates ? |
Beta Was this translation helpful? Give feedback.
-
hmmm... I think it would be a good idea for the user to abandon this and change their code to be more compliant with PostgreSQL |
Beta Was this translation helpful? Give feedback.
-
Either way this is not a JDBC issue. |
Beta Was this translation helpful? Give feedback.
This automatically happens in postgres. Unless you quote "Foo" it will automatically seen as foo by the backend