pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: jose antonio leo <jaleo8@storelandia.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: uppercase = lowercase
Date: 14 Feb 2003 10:20:01 +0000
Message-ID: <1045218001.10914.122.camel@linda.lfix.co.uk> (raw)
In-Reply-To: <KAEFLIDKHEJNPPKOLGHMKELPCNAA.jaleo8@storelandia.com>
References: <KAEFLIDKHEJNPPKOLGHMKELPCNAA.jaleo8@storelandia.com>

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 




view thread (21+ messages)  latest in thread

Message-ID: <1045218001.10914.122.camel@linda.lfix.co.uk>
Permalink:  ../1045218001.10914.122.camel@linda.lfix.co.uk/
Also on:    postgresql.org/message-id/1045218001.10914.122.camel@linda.lfix.co.uk

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: olly@lfix.co.uk, jaleo8@storelandia.com
  Subject: Re: uppercase = lowercase
  In-Reply-To: <1045218001.10914.122.camel@linda.lfix.co.uk>
  References: <KAEFLIDKHEJNPPKOLGHMKELPCNAA.jaleo8@storelandia.com> <1045218001.10914.122.camel@linda.lfix.co.uk>

* 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