Re: case insensitive unique index (part 2) - Mailing list pgsql-general

From Tom Lane
Subject Re: case insensitive unique index (part 2)
Date
Msg-id 17155.981691162@sss.pgh.pa.us
Whole thread Raw
In response to case insensitive unique index (part 2)  (lists <lists@lists.grot.org>)
List pgsql-general
lists <lists@lists.grot.org> writes:
> mydb=> create unique index forward_rr on forward (lower(name));
> ERROR:  DefineIndex: function 'lower(varchar)' does not exist

If you change the name column to type 'text' it will work.  Or you
can make an extra pg_proc entry that relabels lower(text) as
lower(varchar) --- that's safe because text and varchar have the
same representation.  I'm too lazy to reconstruct the necessary
command right now, but this has been described in the mail lists before.

            regards, tom lane

pgsql-general by date:

Previous
From: lists
Date:
Subject: case insensitive unique index (part 2)
Next
From: "Anthony E . Greene"
Date:
Subject: Re: Database and table name case sensitivity