Re: replicating DDL statements - Mailing list pgsql-general

From Ed L.
Subject Re: replicating DDL statements
Date
Msg-id 200303061742.46498.pgsql@bluepolka.net
Whole thread Raw
In response to Re: replicating DDL statements  (Eric B.Ridge <ebr@tcdi.com>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Eric B.Ridge
Date:
Subject: Re: replicating DDL statements
Next
From: "Ed L."
Date:
Subject: Re: replicating DDL statements