Re: Plperlu and sending emails, is it safe?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Plperlu and sending emails, is it safe?
Дата
Msg-id 20040628172903.GA2652@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Plperlu and sending emails, is it safe?  (Thomas Hallgren <thhal@mailblocks.com>)
Ответы Re: Plperlu and sending emails, is it safe?  (Thomas Hallgren <thhal@mailblocks.com>)
Список pgsql-general
On Mon, Jun 28, 2004 at 05:32:55PM +0200, Thomas Hallgren wrote:
> Thomas Hallgren wrote:
> >I would like to make it possible to add a callback that's called just at
> >the start of a transaction as well. Such callbacks would have the
> >ability to generate an error and abort the transaction. Would such a
> >patch be well received?
>
> Correction. Not "start of a transaction" but "just prior to commit"

You want to abort the transaction on the callback?  What for?  You could
have aborted it earlier.

Of course, in a function you could save the mails you are going to send
and register a callback for the actual send, or discard if the
transaction is going to abort.  But you have to be very careful not to
do cause errors during the sending of the mails ...

All in all, I think it's easier to do it with NOTIFY or a cron job.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Jude: I wish humans laid eggs
Ringlord: Why would you want humans to lay eggs?
Jude: So I can eat them


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

Предыдущее
От: "Scrappy"
Дата:
Сообщение: Re: Text message
Следующее
От: Együd Csaba
Дата:
Сообщение: Re: Performance problem on RH7.1