Case Insensitive CHECK CONSTRAINTs - Mailing list pgsql-general

From Shaw Terwilliger
Subject Case Insensitive CHECK CONSTRAINTs
Date
Msg-id 20010314125918.D17868@lister.sourcegear.com
Whole thread Raw
Responses Re: Case Insensitive CHECK CONSTRAINTs
Re: Case Insensitive CHECK CONSTRAINTs
Re: Case Insensitive CHECK CONSTRAINTs
List pgsql-general
I have a table with a TEXT field called "username".  I'd like to retain the
case of the data stored here, but I'd like all comparisons to be done without
regard to case.  Since all these accesses _should_ be done through database
functions, I can simply lower() the input values and compare.  I also have
an index created on lower(username), so lookups are quick.

However, I'd also like to have some sort of table constraint to make sure
alternate case "duplicate" records don't creep into the table.  Any tips?

--
Shaw Terwilliger <sterwill@sourcegear.com>
SourceGear Corporation
217.356.0105 x 641

Attachment

pgsql-general by date:

Previous
From: Tim Frank
Date:
Subject: Re: pg_hba.conf "sameuser"
Next
From: Orion Henry
Date:
Subject: Fast Inserts and Hardware Questions