Re: Case-insensitive - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Case-insensitive
Date
Msg-id 200212061311.40344.dev@archonet.com
Whole thread Raw
In response to Case-insensitive  ("Pedro Igor" <pedroigor@aip.com.br>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Pedro Igor"
Date:
Subject: Case-insensitive
Next
From: "Pedro Igor"
Date:
Subject: Accent-insensitive