Re: Use of !~* to keep a varchar column UNIQUE case-insensitive

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Don Morrison" <donmorrison(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Use of !~* to keep a varchar column UNIQUE case-insensitive
Date: 2006-08-18 20:04:04
Message-ID: 24422.1155931444@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Don Morrison" <donmorrison(at)gmail(dot)com> writes:
> create unique index fooi on foo (lower(substring(name FROM '^\s*(\S*)\s*$')));

> but (at least in postgres 7.4.13) the use of substring doesn't
> work...

You need to double those backslashes.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Don Morrison 2006-08-18 20:30:19 Re: Use of !~* to keep a varchar column UNIQUE
Previous Message Tom Lane 2006-08-18 19:54:51 Re: libpq Describe Extension [WAS: Bytea and perl]