Re: Removing Referential Integrity

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: Removing Referential Integrity
Дата
в 18:52:33
Msg-id
20020525155202.W94270-100000@megazone23.bigpanda.com
Ответ на
Список
Дерево обсуждения
Postgres under CygWin "Nigel J. Andrews" <nandrews@investsystems.co.uk>
Re: Postgres under CygWin Tom Lane <tgl@sss.pgh.pa.us>
Re: Postgres under CygWin Doug Fields <dfields-pg-general@pexicom.com>
Altering existing table to be WITHOUT OIDs Doug Fields <dfields-pg-general@pexicom.com>
Re: Altering existing table to be WITHOUT OIDs Neil Conway <nconway@klamath.dyndns.org>
Re: Altering existing table to be WITHOUT OIDs Doug Fields <dfields-pg-general@pexicom.com>
Re: Altering existing table to be WITHOUT OIDs Tom Lane <tgl@sss.pgh.pa.us>
Removing Referential Integrity Doug Fields <dfields-pg-general@pexicom.com>
Re: Removing Referential Integrity Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Altering existing table to be WITHOUT OIDs Doug Fields <dfields@pexicom.com>
Re: Altering existing table to be WITHOUT OIDs Larry Rosenman <ler@lerctr.org>

On Sat, 25 May 2002, Doug Fields wrote:

> 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?

Drop trigger should work fine as long as you double quote the names
because they're mixed case.

В списке pgsql-general по дате отправления
От: Doug Fields
Дата:
От: Bruce Momjian
Дата:
Сообщение: Re: Data integrity problem !!!
FAQ