can UNIQUEness of TEXT datatype really be guaranteed? - Mailing list pgsql-sql

From
Subject can UNIQUEness of TEXT datatype really be guaranteed?
Date
Msg-id 2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net
Whole thread Raw
Responses Re: can UNIQUEness of TEXT datatype really be guaranteed?
Re: can UNIQUEness of TEXT datatype really be guaranteed?
List pgsql-sql
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
typebecause 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
guaranteewill 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
UNIQUEsomething an uninformed, novice user would do?... or is it something indicative of the strength and/or weeknesses
thatseparate the functionality of the two DBMSs.
 

Ferindo Middleton


pgsql-sql by date:

Previous
From: "Leif B. Kristensen"
Date:
Subject: Re: Triggers
Next
From: Jaime Casanova
Date:
Subject: Re: can UNIQUEness of TEXT datatype really be guaranteed?