Re: Adjustment to "Problem with dropping a FOREIGN KEY"
От | Richard Huxton |
---|---|
Тема | Re: Adjustment to "Problem with dropping a FOREIGN KEY" |
Дата | |
Msg-id | 004701c0b600$42243be0$1001a8c0@archonet.com обсуждение исходный текст |
Ответ на | Adjustment to "Problem with dropping a FOREIGN KEY" (Harry Yau <harry.yau@regaltronic.com>) |
Список | pgsql-general |
From: "Harry Yau" <harry.yau@regaltronic.com> > Dear: > Hi everybody, I've just found the pg_trigger and pg_class, but I am > wondering how can i modify this two file. I've used VI to view it, but > it appear in some strange font of character. Now, I start wonder are > they actually text files or application program. > If they were files, please tell me how can I delete or modify the > context of these two file; otherwise, please show me how may I use them > to drop the constraint trigger that was created by add foreign key. They're database tables - don't use a text editor on them! You can get a listing of all the system tables with \dS - they should all begin with pg_ You can use normal queries to update the pg_triggers and pg_class tables (if you have the right permissions - database owner should be good). You might want to pg_dump things first in case of any problems. Basically, I think postgres gets confused if the reltriggers count is zero while you still have a trigger left in pg_triggers. There is some information on system tables in the developer's docs at www.postgresql.org - Richard Huxton
В списке pgsql-general по дате отправления: