On Thursday March 6 2003 4:53, Eric B. Ridge wrote:
> >>> And in the absence of a SET TRIGGERS='off' command, anyone see any
> >>> concerns with the following?
> >>>
> >>> UPDATE pg_trigger
> >>> SET tgenabled = 'f'
> >>> WHERE tgname LIKE '%whatever%';
> >>
> ... Why not do what pg_dump (in 7.3 anyways) does:
>
> OFF:
> update pg_class set reltriggers = 0 where relname = 'TABLE_NAME';
>
> ON:
> update pg_class set reltriggers = (select count(*) from pg_trigger
> where pg_class.oid = tgrelid) where relname = 'TABLE_NAME';
That works, thanks. Maybe a minor variant of that could be the
implementation of
SET TRIGGERS="off/on"
if it did not already exist, but I defer to the source code gurus. Now if I
could just figure out how to reliably replicate DDL statements
asyncronously via triggers, or some other way compatible with a trigger
approach.
Ed