pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: msi77 <msi77@yandex.ru>
To: Andreas <maps.on@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: Howto have a unique restraint on UPPER (textfield)
Date: Sun, 31 Jan 2010 11:02:17 +0300
Message-ID: <16031264924937@webmail101.yandex.ru> (raw)
In-Reply-To: <4B64EA46.60605@gmx.net>
References: <4B64EA46.60605@gmx.net>

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@postgresql.org) 
> To make changes to your subscription: 
> http://www.postgresql.org/mailpref/pgsql-sql 
> 

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



view thread (8+ messages)  latest in thread

Message-ID: <16031264924937@webmail101.yandex.ru>
Permalink:  ../16031264924937@webmail101.yandex.ru/
Also on:    postgresql.org/message-id/16031264924937@webmail101.yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: msi77@yandex.ru, maps.on@gmx.net
  Subject: Re: Howto have a unique restraint on UPPER (textfield)
  In-Reply-To: <16031264924937@webmail101.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox