Re: ORDER BY case insensitive?
Keith Gray <keith@heart.com.au>
From: Keith Gray <keith@heart.com.au>
To: Jason Earl <jdearl@yahoo.com>
Cc: SQL <pgsql-sql@postgresql.org>
Date: 2001-10-04T23:56:48Z
Lists: pgsql-sql
Jason Earl wrote: > > You can, however, create an index like: > > create index MyTable_lower_idx on MyTable > (lower(name)); > > It won't help with your particular query, but it > certainly would help for queries like: > > SELECT * FROM MyTable WHERE lower(name) = 'jason'; > How would PostgreSQL know to use the index MyTable_lower_idx when I do a ... SELECT * FROM MyTable WHERE lower(name) LIKE 'jas%'; -- Keith Gray Technical Development Manager Heart Consulting Services P/L mailto:keith@heart.com.au