Drop All Foreign Keys ? PostgreSQL 7.2.1

Поиск
Список
Период
Сортировка
От Bart
Тема Drop All Foreign Keys ? PostgreSQL 7.2.1
Дата
Msg-id bipur9$2agb$1@foka1.acn.pl
обсуждение исходный текст
Список pgsql-general
Hello


Sometimes i need to drop one of my tables. DROP TABLE removes all
foreign keys connected with that table. After this i need to recreate FK.


It is not easy to find dropped keys, so i have script to create all keys
in database (ALTER TABLE ... ). It works good, but when  FK exists, it
will create another (exacly the same).

So when i run recreateFK script 4 times, i can find 4 exacly the same FK.

I think that script should first drop all FK and after this create all FK.

And there is my question. How to drop all FK from all tables in database ?


Greetings

Bart


В списке pgsql-general по дате отправления:

Предыдущее
От: "Sephiroth"
Дата:
Сообщение: After install 7.3.4, I got a 7.3.3 ver. no?
Следующее
От: pginfo
Дата:
Сообщение: Database corupption on pg 7.3.3