pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: josh@agliodbs.com
Cc: Palle Girgensohn <girgen@pingpong.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: LIKE should use index when condition doesn't include
Date: Wed, 31 Mar 2004 00:33:51 -0500
Message-ID: <29185.1080711231@sss.pgh.pa.us> (raw)
In-Reply-To: <200403301656.09664.josh@agliodbs.com>
References: <145170000.1080688008@palle.girgensohn.se>
	<26840.1080692204@sss.pgh.pa.us>
	<162280000.1080692911@palle.girgensohn.se>
	<200403301656.09664.josh@agliodbs.com>

Josh Berkus <josh@agliodbs.com> writes:
> ILIKE is not somehow aware that it is equivalent to lower().

Is it?  Given the wild and wonderful behaviors of locales here and
there, I wouldn't want to assume that such an equivalence holds.

In particular I note that iclike() seems to be multibyte-aware while
lower() definitely is not.  Even if that's just a bug, it's a big leap
to assume that ILIKE is equivalent to LIKE on lower().  Think about
Turkish i/I, German esstet (did I spell that right?), ch in various
languages, etc etc.

			regards, tom lane



view thread (7+ messages)

Message-ID: <29185.1080711231@sss.pgh.pa.us>
Permalink:  ../29185.1080711231@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29185.1080711231@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com, girgen@pingpong.net
  Subject: Re: LIKE should use index when condition doesn't include
  In-Reply-To: <29185.1080711231@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox