
It's me and them indexes again.  This time back to text.

What is the difference (as far as an index is concerned) between:

select city from locations where lower(city) = lower('st. ignace');

and 

select city from locations where lower(city) = 'st. ignace';

The index was created like this:

create index locations_city on locations(lower(city) text_ops);


The first gives me the Seq Scan and the second gives me the much needed
Index Scan (there are almost 170K rows in the table).  I can probably
do the lower case conversion in advance in C (since this is called from
a C program) but what am I missing with the difference between these two
statements?   As long as it's receiving lower case, why should the 
optomizer care what's on the right side of the equal sign?

Very confused,
Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
   Online Searchable Campground Listings    http://www.camping-usa.com
       "There is no outfit less entitled to lecture me about bloat
               than the federal government"  -- Tony Snow
==========================================================================



Mon, 03 Aug 1998 15:10:51 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Text indexes...