From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Difference between UNIQUE constraint vs index |
Date: | 2007-02-28 16:31:19 |
Message-ID: | 45E5AE57.5060308@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>> I would imagine that other DBMSes also enforce uniqueness by means of
>>> indexes, because it'd be awful darn expensive to enforce the constraint
>>> without one; but I'm only guessing here, not having looked. Can anyone
>>> point to a real system that enforces unique constraints without an
>>> underlying index?
>
> In Rdb/VMS (which does not use MVCC), PK (and it's alias UNIQUE)
> constraints are independent of whether you have a unique index on
> the table.
PK is NOT an alias for UNIQUE. Yes it does have the same functional
operation but it is technically incorrect to consider them the same.
>
> Now, 99.44% of the time you will *not* have a PK constraint, but
> simply a unique index.
Then you have designed your database incorrectly.
Sincerely,
Joshua D. Drake
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Shepard | 2007-02-28 16:40:58 | Re: Post-Reboot Issue: Postmaster Not Accessible |
Previous Message | Tom Lane | 2007-02-28 16:31:00 | Re: Post-Reboot Issue: Postmaster Not Accessible |