Re: how to make a trigger to copy files.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to make a trigger to copy files.
Дата
Msg-id 5464.1106507109@sss.pgh.pa.us
обсуждение исходный текст
Ответ на how to make a trigger to copy files.  (Mitchell Laks <mlaks@verizon.net>)
Список pgsql-admin
Mitchell Laks <mlaks@verizon.net> writes:
> I would like my server to immediately "scp" the file to another machine, as
> soon as the application updates the table with the new entry.

> But when i look for sample triggers on the web they seem to only do things
> internal to the database (change field entries etc, check them for business
> logic rules etc).

That's generally a good design rule, for the simple reason that a
trigger can never know whether the transaction will roll back after
it executes.  If you change state outside the database then that state
may become inconsistent with the database.  However, if you can restrict
your operations to cases where that won't hurt much, you may be able to
get away with it.

            regards, tom lane

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

Предыдущее
От: Richard Poole
Дата:
Сообщение: Re: Trouble Escaping Quotes
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: how to make a trigger to copy files.