Re: Can't drop constraint?
От | Michael Monnerie |
---|---|
Тема | Re: Can't drop constraint? |
Дата | |
Msg-id | 200905062054.20847@zmi.at обсуждение исходный текст |
Ответ на | Re: Can't drop constraint? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-admin |
On Mittwoch 06 Mai 2009 Tom Lane wrote: > 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. To take it to a point: Creating an index has advantages over constraints, without any disadvantage? So I will always only use indices, not constraints, to have a more uniform db model. mfg zmi -- // Michael Monnerie, Ing.BSc ----- http://it-management.at // Tel: 0660 / 415 65 31 .network.your.ideas. // PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import" // Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4 // Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4
В списке pgsql-admin по дате отправления: