Case sensitivity

From: "Frank Millman" <frank(at)chagford(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Case sensitivity
Date: 2005-08-06 09:36:19
Message-ID: VPOP32.1.0e.20050806113716.078.2.1.a40c1f81@chagford.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2005-08-06 12:08:54 Re: Postgresql Hosting
Previous Message reddy 2005-08-06 08:07:45 Error Loading postgresql