Case insensitive unique constraint

From: Rob Brenart <postgresql(at)oculardata(dot)com>
To:
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Case insensitive unique constraint
Date: 2005-07-14 07:14:16
Message-ID: 42D610C8.3040409@oculardata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a simple table to store account names... I want each name to be
unique in a case insensitive manner... but I want the case the user
enters to be remembered so I can't do a simple lower() on the data's way in.

Is there an easy way to go about this? Am I about to write my first
server side function for postgresql?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martynas Brijunas 2005-07-14 07:31:33 Quotation marks in queries
Previous Message Roman Neuhauser 2005-07-14 06:14:36 Re: To Postgres or not