Re: Howto have a unique restraint on UPPER (textfield)

From: msi77 <msi77(at)yandex(dot)ru>
To: Andreas <maps(dot)on(at)gmx(dot)net>,pgsql-sql(at)postgresql(dot)org
Subject: Re: Howto have a unique restraint on UPPER (textfield)
Date: 2010-01-31 08:02:17
Message-ID: 16031264924937@webmail101.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I think you need CS collation and UNIQUE(name).

> Hi,
> is there a way to define a unique restraint on UPPER (textfield)?
> E.g.
> mytable (
> name_id serial PRIMARY KEY,
> name varchar(255),
> UNIQUE ( upper (name) )
> )
> psql throws a syntax error because of the upper() function.
> I need to prohibit that 2 of strings like cow, Cow, CoW appears in
> the name-column.
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

Здесь спама нет http://mail.yandex.ru/nospam/sign

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas 2010-01-31 20:48:28 Re: Howto have a unique restraint on UPPER (textfield)
Previous Message Joshua Tolley 2010-01-31 02:56:53 Re: Howto have a unique restraint on UPPER (textfield)