Case sensitivity - Mailing list pgsql-general

From Frank Millman
Subject Case sensitivity
Date
Msg-id VPOP32.1.0e.20050806113716.078.2.1.a40c1f81@chagford.com
Whole thread Raw
Responses Re: Case sensitivity  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Hi all

Is there an LC_COLLATE setting, or any other method, which allows all data
in a database to be treated in a case-insensitive manner?

I have two scenarios in mind. There are workarounds for both of them, but it
would be nice if they were not necessary.

1. In a UNIQUE column, I would like a value of 'a' to be rejected if there
is already a value of 'A'. Workaround - create a unique index on
LOWER(col_name).

2. I would like WHERE col_name = 'x' and WHERE col_name LIKE 'x%' to find
'X' and 'X1'. Workaround - WHERE LOWER(col_name) = 'x' and WHERE col_name
ILIKE 'x%'.

TIA

Frank Millman



pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: Postgresql Hosting
Next
From: "John Wells"
Date:
Subject: Re: Optimizing large data loads