Removing Referential Integrity

Поиск
Список
Период
Сортировка
От Doug Fields
Тема Removing Referential Integrity
Дата
Msg-id 5.1.0.14.2.20020525160340.02c4ceb8@mail.pexicom.com
обсуждение исходный текст
Ответ на Re: Altering existing table to be WITHOUT OIDs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Removing Referential Integrity  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Hi all,

In 7.2.1...

I have a few tables built with REFERENCES for which I would like to
permanently remove these constraints in the search of higher performance
INSERTs.

 From pg_dump, I see these commands:

-- Disable triggers
UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = 'accounts';
-- Enable triggers
UPDATE pg_class SET reltriggers = (SELECT count(*) FROM pg_trigger where
pg_class.oid = tgrelid) WHERE relname = 'accounts';

I'm not sure, however, if that actually permanently removes the CONSTRAINT
TRIGGER. There does not seem to be an equivalent REMOVE CONSTRAINT TRIGGER,
and DROP TRIGGER won't work on the trigger reported by psql's \d command.

Any thoughts?

Thanks,

Doug


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

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Moving data from FreeBSD to Red Hat
Следующее
От: Doug Fields
Дата:
Сообщение: Re: Altering existing table to be WITHOUT OIDs