From: Michael Glaesemann <grzm@seespotcode.net>
To: Daniel CAUNE <d.caune@free.fr>
Cc: pgsql-sql@postgresql.org
Subject: Re: Constraint UNIQUE on a column not case sensitive
Date: Sat, 1 Jul 2006 23:01:08 +0900
Message-ID: <07BE168B-0F4D-417A-8EB4-E1D55F753E19@seespotcode.net> (raw)
In-Reply-To: <0J1Q008ME8ZX7M90@VL-MO-MR003.ip.videotron.ca>
References: <0J1Q008ME8ZX7M90@VL-MO-MR003.ip.videotron.ca>
On Jul 1, 2006, at 22:47 , Daniel CAUNE wrote:
> The idea is to have an index on that column, in a not case
> sensitive form, i.e. lower(MyColumn).
I think you're really close. Try
CREATE UNIQUE INDEX ci_mycolumn_idx ON mytable(lower(mycolumn));
Does that do what you're looking for?
Michael Glaesemann
grzm seespotcode net
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: grzm@seespotcode.net, d.caune@free.fr
Subject: Re: Constraint UNIQUE on a column not case sensitive
In-Reply-To: <07BE168B-0F4D-417A-8EB4-E1D55F753E19@seespotcode.net>
* 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