Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8E7EF6324FF for ; Sat, 30 Jan 2010 22:25:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15581-06 for ; Sun, 31 Jan 2010 02:25:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id A284A63249E for ; Sat, 30 Jan 2010 22:25:21 -0400 (AST) Received: (qmail invoked by alias); 31 Jan 2010 02:25:18 -0000 Received: from i59F79FD5.versanet.de (EHLO [192.168.1.113]) [89.247.159.213] by mail.gmx.net (mp048) with SMTP; 31 Jan 2010 03:25:18 +0100 X-Authenticated: #14269776 X-Provags-ID: V01U2FsdGVkX18VosdhxesVWsWNl1gB7GlZMq0kLUVb4aKZrEc02m VYg/5UCWHyTKAa Message-ID: <4B64EA46.60605@gmx.net> Date: Sun, 31 Jan 2010 03:26:14 +0100 From: Andreas User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Howto have a unique restraint on UPPER (textfield) Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68000000000000005 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/51 X-Sequence-Number: 33587 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.