Re: replicating DDL statements

Поиск
Список
Период
Сортировка
От Ed L.
Тема Re: replicating DDL statements
Дата
Msg-id 200303061742.46498.pgsql@bluepolka.net
обсуждение исходный текст
Ответ на Re: replicating DDL statements  (Eric B.Ridge <ebr@tcdi.com>)
Список 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 по дате отправления:

Предыдущее
От: Eric B.Ridge
Дата:
Сообщение: Re: replicating DDL statements
Следующее
От: "Ed L."
Дата:
Сообщение: Re: replicating DDL statements