| От | Tom Lane |
|---|---|
| Тема | Re: Security implications of untrusted triggers |
| Дата | |
| Msg-id | 19340.1137092160@sss.pgh.pa.us обсуждение |
| Ответ на | Security implications of untrusted triggers (Joshua Kramer <josh@bitbuckets.com>) |
| Список | pgsql-general |
Joshua Kramer <josh@bitbuckets.com> writes:
> I am writing a couple of Perl modules that talk to the outside world: one
> talks to a database (via DBI), and one talks to a Jabber/XMPP server. I
> want to use these from within a Trigger.
This is most likely a bad idea for reasons that have nothing to do with
security. Consider what happens when the trigger executes and later in
the transaction there's an error, causing the whole transaction to roll
back. Now the outside world has changed state and your database has
not.
It's usually better to have an application process that is in charge of
monitoring database state and updating external stuff to match. See the
archives for many previous discussions of this point.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера