Re: How to use a trigger to write rows to a remote server

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: How to use a trigger to write rows to a remote server
Дата
Msg-id 469E199D.1040402@enterprisedb.com
обсуждение исходный текст
Ответ на How to use a trigger to write rows to a remote server  ("Michael Dengler" <michael.dengler@gmail.com>)
Список pgsql-performance
Michael Dengler wrote:
> I am trying to find out how to use a trigger function on a table to copy
> any
> inserted row to a remote PG server.

Have a look at contrib/dblink.

You'll have to think what you want to happen in error scenarios. For
example, if the connection is down, or it brakes just after inserting
the row to the other db, but before committing. Or if the insert on the
other server succeeds, but the local transaction aborts.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Michael Dengler"
Дата:
Сообщение: How to use a trigger to write rows to a remote server
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: How to use a trigger to write rows to a remote server