Re: How to change primary key in a table
От | Tom Lane |
---|---|
Тема | Re: How to change primary key in a table |
Дата | |
Msg-id | 24459.1258038957@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | How to change primary key in a table (Rikard Bosnjakovic <rikard.bosnjakovic@gmail.com>) |
Ответы |
using position in where
|
Список | pgsql-novice |
Rikard Bosnjakovic <rikard.bosnjakovic@gmail.com> writes: > I tried this: > ======================================== > SQL error: > ERROR: cannot drop constraint penalty_codes_pkey on table > penalty_codes because other objects depend on it > HINT: Use DROP ... CASCADE to drop the dependent objects too. > In statement: > ALTER TABLE "penalty_codes" DROP CONSTRAINT "penalty_codes_pkey" > ======================================== The system will normally tell you exactly what depends on the constraint. 8.4 includes this in a DETAIL line, but prior releases spit it out as separate NOTICE message(s). I surmise that you are running a pre-8.4 release and you have client_min_messages set to suppress NOTICEs :-( (Offhand I can't think of anything except foreign keys that would depend on a PK constraint, but you may as well get the authoritative statement from your DB.) regards, tom lane
В списке pgsql-novice по дате отправления: