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