Re: Case Insensitive Comparison with Postgres 12

2019-10-12 Thread Daniel Verite
Igal Sapir wrote: > > Out of curiosity is there a eason not to use the citext type for th? > > > > > Using the collation seems like a much cleaner approach, and I trust ICU to > do a better job at comparing strings according to language rules etc. One notable difference between citext

Re: Case Insensitive Comparison with Postgres 12

2019-10-11 Thread Igal Sapir
On Fri, Oct 11, 2019 at 1:09 AM stan wrote: > On Thu, Oct 10, 2019 at 05:41:47AM -0700, Igal @ Lucee.org wrote: > > On 10/9/2019 12:34 AM, Laurenz Albe wrote: > > > Igal Sapir wrote: > > > > I am trying to test a simple case insensitive comparison. Most > likely the > > > > collation that I

Re: Case Insensitive Comparison with Postgres 12

2019-10-10 Thread Igal @ Lucee.org
Thomas, On 10/10/2019 6:22 AM, Thomas Kellerer wrote: Igal @ Lucee.org schrieb am 10.10.2019 um 14:41: Thank you all for replying. I tried to use the locale suggested by both Laurenz and Pavel, en-US-u-ks-level2, but I'm still getting false for a simple comparison of 'Abc' = 'abc'. I tried

Re: Case Insensitive Comparison with Postgres 12

2019-10-10 Thread Thomas Kellerer
Igal @ Lucee.org schrieb am 10.10.2019 um 14:41: > Thank you all for replying. I tried to use the locale suggested by > both Laurenz and Pavel, en-US-u-ks-level2, but I'm still getting > false for a simple comparison of 'Abc' = 'abc'. I tried the locale > both as a 'string' and as an

Re: Case Insensitive Comparison with Postgres 12

2019-10-10 Thread Igal @ Lucee.org
On 10/9/2019 12:34 AM, Laurenz Albe wrote: Igal Sapir wrote: I am trying to test a simple case insensitive comparison. Most likely the collation that I chose is wrong, but I'm not sure how to choose the correct one (for English/US?). Here is my snippet: create collation case_insensitive(

Re: Case Insensitive Comparison with Postgres 12

2019-10-09 Thread Pavel Křehula
Hello, use correct locale identifier, in your case it should be: create collation "case_insensitive" (provider=icu, locale="en-US-u-ks-level2", deterministic = false); See http://www.unicode.org/reports/tr35/tr35-collation.html#Setting_Options for available options. -- Pavel Dne 09.10.2019

Re: Case Insensitive Comparison with Postgres 12

2019-10-09 Thread Laurenz Albe
Igal Sapir wrote: > I am trying to test a simple case insensitive comparison. Most likely the > collation that I chose is wrong, but I'm not sure how to choose the correct > one (for English/US?). Here is my snippet: > > create collation case_insensitive( > provider=icu,

Re: Case Insensitive Comparison with Postgres 12

2019-10-09 Thread Wim Bertels
Using the datatype citext might be an alternative solution Igal Sapir schreef op October 8, 2019 10:51:52 PM UTC: >I am trying to test a simple case insensitive comparison. Most likely >the >collation that I chose is wrong, but I'm not sure how to choose the >correct >one (for English/US?).

Re: Case Insensitive Comparison with Postgres 12

2019-10-08 Thread Morris de Oryx
As I understand it, custom collation are not applied globally. Meaning, you have to associate a collation with a column or en expression with COLLATE.

Case Insensitive Comparison with Postgres 12

2019-10-08 Thread Igal Sapir
I am trying to test a simple case insensitive comparison. Most likely the collation that I chose is wrong, but I'm not sure how to choose the correct one (for English/US?). Here is my snippet: create collation case_insensitive( provider=icu, locale='en-US-x-icu', deterministic=false );