Re: Difference between UNIQUE constraint vs index

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Difference between UNIQUE constraint vs index
Дата
Msg-id 45E5AE57.5060308@commandprompt.com
обсуждение исходный текст
Ответ на Re: Difference between UNIQUE constraint vs index  (Ron Johnson <ron.l.johnson@cox.net>)
Ответы Re: Difference between UNIQUE constraint vs index  (Ron Johnson <ron.l.johnson@cox.net>)
Список 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@postgresql.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/


В списке pgsql-general по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Post-Reboot Issue: Postmaster Not Accessible -- FIXED
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Post-Reboot Issue: Postmaster Not Accessible