My recommendation is that you somehow force all data stored in that column to
the same case. It may not be a perfect solution but then, this problem strikes
me as rare enough that there may not be a better one.
Donald
-------------- Original message ----------------------
From: Ziad Mansouri <[EMAIL PROTECTED]>
> Mates,
>
> I'm trying to create a constraint, on a varchar
> column, which is case insensitive. Here's the table:
>
> create table categories (
> category_id int not null generated always as identity
> primary key,
> category varchar(64) not null
> );
>
> I've tried:
>
> category varchar(64) not null unique
>
> but then these two inserts are OK when I don't want
> them to be:
>
> insert into categories(category) values('Test');
> insert into categories(category) values('test');