Re: Sending email from PL/pgSQL

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: Sending email from PL/pgSQL
Дата
Msg-id 1447585.KsiBEi0yGS@skynet.simkin.ca
обсуждение исходный текст
Ответ на Sending email from PL/pgSQL  (Jack Kaufman <jack.kaufman@sanmina.com>)
Список pgsql-novice
On Wednesday, August 28, 2013 12:39:14 PM Jack Kaufman wrote:
> Would someone provide an example of how to send email from a PL/pgSQL
> function?
>
> Thanks in advance.
>
> Jack


I don't believe you can access anything external to PostgreSQL using PL/pgSQL.
You can create untrusted functions using other languages, though, like PL/Perl
or PL/Python, and use those languages' native libraries to send mail.

I wouldn't actually recommend doing so, though. I would suggest putting the
messages to be sent into a separate table and have an external script poll
that and send the mail as required.

Also, .jar files are for Java or Javascript, and are unlikely to have much to
do with your PostgreSQL installation.


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

Предыдущее
От: Jack Kaufman
Дата:
Сообщение: Sending email from PL/pgSQL
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Sending email from PL/pgSQL