X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EA56AD9566 for ; Tue, 22 Nov 2005 13:37:20 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80810-09 for ; Tue, 22 Nov 2005 17:37:19 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by svr1.postgresql.org (Postfix) with ESMTP id 4AA44D86C2 for ; Tue, 22 Nov 2005 13:37:17 -0400 (AST) Received: from vms068.mailsrvcs.net ([192.168.1.1]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IQD00F2BA6C37D5@vms042.mailsrvcs.net> for pgsql-sql@postgresql.org; Tue, 22 Nov 2005 11:35:00 -0600 (CST) Date: Tue, 22 Nov 2005 11:35:00 -0600 (CST) From: Subject: can UNIQUEness of TEXT datatype really be guaranteed? To: pgsql-sql@postgresql.org Message-id: <2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.469 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, NO_REAL_NAME=0.55] X-Spam-Score: 2.469 X-Spam-Level: ** X-Archive-Number: 200511/207 X-Sequence-Number: 23458 I am in the process re-implementing some pgsql table declarations into a MySQL database. I have this one line where I say ... fieldname TEXT UNIQUE, ... in my pgsql table because I want to ensure that no one enters the same thing in this field and I didn't choose VARCHAR type because I have no idea how possibly long I might need to let the field be... ... but MySQL doesn't like this because a TEXT datatype is considered a BLOB that can't be indexed and it can't guarantee will be UNIQUE apparently... So I can't help but wonder, can Postgres really guarantee a TEXT field to be UNIQUE... or is declaring a TEXT field UNIQUE something an uninformed, novice user would do?... or is it something indicative of the strength and/or weeknesses that separate the functionality of the two DBMSs. Ferindo Middleton