Re: [HACKERS] ILIKE vs indices

2012-12-29 Thread Greg Stark
On Sat, Dec 29, 2012 at 2:05 PM, Greg Stark wrote: > I can't quite wrap my head around the idea of "LIKE" and collations > having any meaningful interaction anyways. I certainly can't come up > with anything better than "lower() like lower()" (or "upper() like > upper()"). Hm. Maybe I spoke too f

Re: [HACKERS] ILIKE vs indices

2012-12-29 Thread Greg Stark
On Fri, Dec 28, 2012 at 11:41 PM, Tom Lane wrote: > James Cloos writes: >> Is there any contraindication to recasting: >> foo ILIKE 'bar' >> into: >> LOWER(foo) LIKE LOWER('bar') > > In some locales those are not equivalent, I believe, or at least > shouldn't be. (What the current code actua

Re: [HACKERS] ILIKE vs indices

2012-12-29 Thread James Cloos
> "TL" == Tom Lane writes: JC>> Is there any contraindication to recasting: JC>> foo ILIKE 'bar' JC>> into: JC>> LOWER(foo) LIKE LOWER('bar') TL> In some locales those are not equivalent, I believe, or at least TL> shouldn't be. (What the current code actually does is a separate TL> questio

Re: [HACKERS] ILIKE vs indices

2012-12-28 Thread Tom Lane
James Cloos writes: > Is there any contraindication to recasting: > foo ILIKE 'bar' > into: > LOWER(foo) LIKE LOWER('bar') In some locales those are not equivalent, I believe, or at least shouldn't be. (What the current code actually does is a separate question.) > Perhaps the parser could