Re: uppercase = lowercase - Mailing list pgsql-admin

From Oliver Elphick
Subject Re: uppercase = lowercase
Date
Msg-id 1045218001.10914.122.camel@linda.lfix.co.uk
Whole thread Raw
In response to uppercase = lowercase  ("jose antonio leo" <jaleo8@storelandia.com>)
List pgsql-admin
On Fri, 2003-02-14 at 08:51, jose antonio leo wrote:

> How can I make selects not sensitive uppercase and lowercase characters?
> This is possible modifying something of psql configuration?

I take it you mean that

  SELECT x FROM t WHERE x = 'abc';

should also return rows where x = 'ABC' and x = 'Abc' and so on.

The answer is to make your condition say what it means:

  SELECT x FROM t WHERE lower(x) = 'abc'.

If you do this a lot, you may well want to create an index on lower(x).

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "God be merciful unto us, and bless us; and cause his
      face to shine upon us."          Psalms 67:1


pgsql-admin by date:

Previous
From: "jose antonio leo"
Date:
Subject: uppercase = lowercase
Next
From: P G
Date:
Subject: What is the default timeout setting for connections to the db?