pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: fmiddleton@verizon.net
To: pgsql-sql@postgresql.org
Subject: can UNIQUEness of TEXT datatype really be guaranteed?
Date: Tue, 22 Nov 2005 11:35:00 -0600 (CST)
Message-ID: <2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net>
Permalink:  ../2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net/
Also on:    postgresql.org/message-id/2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net

 · 

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: fmiddleton@verizon.net
  Subject: Re: can UNIQUEness of TEXT datatype really be guaranteed?
  In-Reply-To: <2238206.1132680900217.JavaMail.root@vms068.mailsrvcs.net>

* 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