Обсуждение: Enable/Disable Triggers

Поиск
Список
Период
Сортировка

Enable/Disable Triggers

От
Germán Hüttemann Arza
Дата:
Hello,

I tried to execute ALTER TABLE emp DISABLE TRIGGER after_ins_emp on PostgreSQL
7.4.13 and I realised that feature isn't include yet in this version.

How can I enable/disable a trigger in this version of PostgreSQL? Should I set
the attribute tgenabled from pg_trigger directly?

Hope you can help me.

Regards,

--
Germán Hüttemann Arza
CNC - Centro Nacional de Computación
UNA - Universidad Nacional de Asunción
Campus Universitario, San Lorenzo - Paraguay
http://www.cnc.una.py  - Tel.: 595 21 585550

Re: Enable/Disable Triggers

От
Tom Lane
Дата:
=?iso-8859-1?q?Germ=E1n_H=FCttemann_Arza?= <ghuttemann@gmail.com> writes:
> Hello,
> I tried to execute ALTER TABLE emp DISABLE TRIGGER after_ins_emp on PostgreSQL
> 7.4.13 and I realised that feature isn't include yet in this version.

> How can I enable/disable a trigger in this version of PostgreSQL?

Update?

Seriously, although the tgenabled column exists in that version, I seem
to recall that it wasn't honored everywhere in the code, and there are
some caching effects to worry about too.  I'm afraid you'll find that
changing it manually works only erratically, if at all.

            regards, tom lane