Re: Can't drop constraint? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Can't drop constraint?
Date
Msg-id 4141.1241618053@sss.pgh.pa.us
Whole thread Raw
In response to Re: Can't drop constraint?  (Michael Monnerie <michael.monnerie@is.it-management.at>)
Responses Re: Can't drop constraint?  (Michael Monnerie <michael.monnerie@is.it-management.at>)
List pgsql-admin
Michael Monnerie <michael.monnerie@is.it-management.at> writes:
> On Dienstag 05 Mai 2009 Tom Lane wrote:
>> Apparently this is just an index, not a constraint (the difference
>> being that it was made with CREATE INDEX, not ALTER TABLE ADD
>> CONSTRAINT). Try

> Is there a performance difference?

No.  A primary key or unique constraint is implemented by creating
a unique index (and, for PK, also by creating NOT NULL constraints
on the columns).  After that, the only visible difference is that
there's an entry in pg_constraint, or not.  There are some minor
behavioral differences --- if memory serves, you need a PK constraint
entry to persuade a REFERENCES constraint that it should consider
a given column as the default reference target --- but no performance
difference.

            regards, tom lane

pgsql-admin by date:

Previous
From: Carol Walter
Date:
Subject: Re: Can't drop constraint?
Next
From: Félix Sánchez Rodríguez
Date:
Subject: Re: Creating functions