pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Pedro Igor <pedroigor@aip.com.br>
To: pgsql-sql@postgresql.org
Subject: Re: Case-insensitive
Date: Fri, 6 Dec 2002 13:11:40 +0000
Message-ID: <200212061311.40344.dev@archonet.com> (raw)
In-Reply-To: <000f01c29d23$b396b5d0$0b00010a@aip.com.br>
References: <000f01c29d23$b396b5d0$0b00010a@aip.com.br>

On Friday 06 Dec 2002 12:33 pm, Pedro Igor wrote:
> Someone knows how config the postgresql for case-insensitive mode ?

There isn't really a case-insensitive mode (for various reasons to do with 
locales AFAICT).

There are various case-insensitive comparisons: ILIKE instead of LIKE etc.

A very common approach is to use PG's functional indexes:

SELECT * FROM foo WHERE lower(foo_col) LIKE 'blah%';

along with

CREATE INDEX foo_lwr_col ON foo (lower(foo_col));

-- 
  Richard Huxton



view thread (2+ messages)

Message-ID: <200212061311.40344.dev@archonet.com>
Permalink:  ../200212061311.40344.dev@archonet.com/
Also on:    postgresql.org/message-id/200212061311.40344.dev@archonet.com

 · 

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: dev@archonet.com, pedroigor@aip.com.br
  Subject: Re: Case-insensitive
  In-Reply-To: <200212061311.40344.dev@archonet.com>

* 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