Re: Can't drop constraint?
| От | Tom Lane |
|---|---|
| Тема | Re: Can't drop constraint? |
| Дата | |
| Msg-id | 4141.1241618053@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Can't drop constraint? (Michael Monnerie <michael.monnerie@is.it-management.at>) |
| Ответы |
Re: Can't drop constraint?
|
| Список | 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 по дате отправления: