pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keith Gray <keith@heart.com.au>
To: Jason Earl <jdearl@yahoo.com>
Cc: SQL <pgsql-sql@postgresql.org>
Subject: Re: ORDER BY case insensitive?
Date: Fri, 05 Oct 2001 09:56:48 +1000
Message-ID: <3BBCF740.931A32AD@heart.com.au> (raw)
References: <20011004212255.3654.qmail@web10002.mail.yahoo.com>

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



view thread (8+ messages)  latest in thread

Message-ID: <3BBCF740.931A32AD@heart.com.au>
Permalink:  ../3BBCF740.931A32AD@heart.com.au/
Also on:    postgresql.org/message-id/3BBCF740.931A32AD@heart.com.au

 · 

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-sql@postgresql.org
  Cc: keith@heart.com.au, jdearl@yahoo.com
  Subject: Re: ORDER BY case insensitive?
  In-Reply-To: <3BBCF740.931A32AD@heart.com.au>

* 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