Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A247A63272E for ; Sun, 31 Jan 2010 04:05:20 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 09441-03 for ; Sun, 31 Jan 2010 08:05:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [95.108.130.119]) by mail.postgresql.org (Postfix) with ESMTP id CD0C663259B for ; Sun, 31 Jan 2010 04:02:20 -0400 (AST) Received: from webmail101.yandex.ru (webmail101.yandex.ru [95.108.131.129]) by forward15.mail.yandex.net (Yandex) with ESMTP id 4624CC10C9; Sun, 31 Jan 2010 11:02:18 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1264924938; bh=UUo771lh5BKRMCjvNL4fls80agqtkQ/7v0qTqG3C+Pk=; h=From:To:In-Reply-To:References:Subject:MIME-Version:Message-Id: Date:Content-Transfer-Encoding:Content-Type; b=r4LuHImTiiEJI/pwyNQiSyfLl3Ubclz9G7ZBiPfSDHmf9kuoL4lBuz3hty6g+VP0t MtO/Wo30fVDLoQ0uWC4LiAtxgnxY4fc9Ui92KIGX/oqLVYZi+tvkUaJHR3W8trchU+ BqVJB7NF9aAjaaUglZS6pUwQPtRfNenJESiVKKeg= Received: from localhost (localhost.localdomain [127.0.0.1]) by webmail101.yandex.ru (Yandex) with ESMTP id 3087426C41C3; Sun, 31 Jan 2010 11:02:18 +0300 (MSK) X-Yandex-Spam: 1 X-Yandex-Front: webmail101 X-Yandex-TimeMark: 1264924938 Received: from user-29.81.118.217.in-addr.arpa (user-29.81.118.217.in-addr.arpa [217.118.81.29]) by mail.yandex.ru with HTTP; Sun, 31 Jan 2010 11:02:17 +0300 From: msi77 To: Andreas ,pgsql-sql@postgresql.org In-Reply-To: <4B64EA46.60605@gmx.net> References: <4B64EA46.60605@gmx.net> Subject: Re: Howto have a unique restraint on UPPER (textfield) MIME-Version: 1.0 Message-Id: <16031264924937@webmail101.yandex.ru> Date: Sun, 31 Jan 2010 11:02:17 +0300 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201001/53 X-Sequence-Number: 33589 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