From: Tom Lane <tgl@sss.pgh.pa.us>
To: Keith Gray <keith@heart.com.au>
Cc: Jason Earl <jdearl@yahoo.com>
Cc: SQL <pgsql-sql@postgresql.org>
Subject: Re: ORDER BY case insensitive?
Date: Thu, 04 Oct 2001 20:32:08 -0400
Message-ID: <3175.1002241928@sss.pgh.pa.us> (raw)
In-Reply-To: <3BBCF740.931A32AD@heart.com.au>
References: <20011004212255.3654.qmail@web10002.mail.yahoo.com>
<3BBCF740.931A32AD@heart.com.au>
Keith Gray <keith@heart.com.au> writes:
> How would PostgreSQL know to use the index
> MyTable_lower_idx when I do a ...
> SELECT * FROM MyTable WHERE lower(name) LIKE 'jas%';
The same way it knows to use any other index: it matches up the things
mentioned in the WHERE clause with the available indexes, and then sees
whether the clauses they are mentioned in are comparisons that the index
can help with. In this case the "thing" mentioned is "function(column)"
rather than just "column", but otherwise it's just like a simple index.
regards, tom lane
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, keith@heart.com.au, jdearl@yahoo.com
Subject: Re: ORDER BY case insensitive?
In-Reply-To: <3175.1002241928@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