Re: Adding foreign key constraints without integrity check?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: louis gonzales <gonzales(at)linuxlouis(dot)net>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, Wes <wespvp(at)syntegra(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Adding foreign key constraints without integrity check?
Date: 2006-06-20 20:25:01
Message-ID: 20060620202501.GA21987@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 20, 2006 at 00:49:21 -0400,
louis gonzales <gonzales(at)linuxlouis(dot)net> wrote:
> Florian,
> I understand where you're coming from. Indexes are always unique and
> all RDBMS systems use them to 'uniquely' identify a row from the the
> perspective of internal software management. Index != PrimaryKey, so
> every table created, despite any Primary/Foreign key contraints put on
> them, always have a 1-1 Index per row entry. At least that's the way I
> understand it, can someone else affirm this statement or redirect a
> misguided 'me ;)'?

Note that indexes are not always unique. They can sometimes still be useful for
speeding up performance even when there are duplicates. Postgres also has
partial indexes which cover only some of the rows in a table, based on
a where condition.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chander Ganesan 2006-06-20 20:32:23 Re: Start up question about triggers
Previous Message Martijn van Oosterhout 2006-06-20 20:17:14 Re: Exporting data from view