Re: 'dblink' Help

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: 'dblink' Help
Дата
Msg-id 401C042E.5000705@joeconway.com
обсуждение исходный текст
Ответ на 'dblink' Help  (JinNet Picker <netpicker9@yahoo.com>)
Список pgsql-admin
JinNet Picker wrote:

> What i need is, when ever a NEW record is inserted in
> 'MyDb1' , i want fire a Trigger or Rule to insert the
> Same Record to MyDb2 database.

> Anybody Got Idea how to do this?

See the dblink documentation for dblink_exec(), and see the Postgres
documentation for how to create triggers:
http://www.postgresql.org/docs/current/static/triggers.html
You'll probably want to create the trigger function using PL/pgSQL:
http://www.postgresql.org/docs/current/static/plpgsql.html

Joe



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

Предыдущее
От: "Sally Sally"
Дата:
Сообщение: Separating a single database into different disks
Следующее
От: "JSaula"
Дата:
Сообщение: How do I do download of pgadmin III?