Re: Difference between UNIQUE constraint vs index

From: "Brandon Aiken" <BAiken(at)winemantech(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Difference between UNIQUE constraint vs index
Date: 2007-02-28 22:17:02
Message-ID: F8E84F0F56445B4CB39E019EF67DACBA48C2B1@exchsrvr.winemantech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Problem number 6,534 with implementing an abstract concept such as an
RDB on a digital computer with an electro-magno-mechanical storage
system.

:p

--
Brandon Aiken
CS/IT Systems Engineer
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, February 28, 2007 11:03 AM
To: Brandon Aiken
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Difference between UNIQUE constraint vs index

"Brandon Aiken" <BAiken(at)winemantech(dot)com> writes:
> SQLite, MySQL, and MS Access each use indexes for unique constraints.
> Doesn't the SQL spec specify that CREATE INDEX can be used to create
> UNIQUE indexes?

No, there is no such command in the SQL spec. In fact the concept of an
index does not appear anywhere in the spec ... it's an implementation
detail.

regards, tom lane

--------------------------------------------------------------------
** LEGAL DISCLAIMER **
Statements made in this e-mail may or may not reflect the views and
opinions of Wineman Technology, Inc. or its employees.

This e-mail message and any attachments may contain legally privileged,
confidential or proprietary information. If you are not the intended
recipient(s), or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are hereby notified
that any dissemination, distribution or copying of this e-mail
message is strictly prohibited. If you have received this message in
error, please immediately notify the sender and delete this e-mail
message from your computer.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-02-28 22:23:00 Re: Select retrieval slowdown after db drop/reload. Suggestions?
Previous Message Rob Schall 2007-02-28 22:06:04 Differences in identical queries