From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Send email from PostgreSQL, may I ? |
Date: | 2006-10-27 17:32:36 |
Message-ID: | 454242B4.7090607@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tony Caduto wrote:
>
>> Typically this is bad idea. Better save the email info on a table and
>> fire a NOTIFY. An external daemon would be listening to that
>> notification, and send the email from the data in the table, which it
>> can subsequently delete or mark as used.
>>
>> This is also better because you have a chance to retry if your SMTP is
>> down or whatever. If you fail to send the mail in a trigger or
>> function, you have no way to wait 10 minutes without clogging your
>> application.
>>
>>
> I wouldn't go so far as to say it's a bad idea(it really depends on what
> you need to do).
It certainly can be a very bad idea. Especially if the client that fires
the process is a web server.
Joshua D. Drake
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2006-10-27 17:36:13 | Re: Mailing list problem? |
Previous Message | Merlin Moncure | 2006-10-27 17:10:26 | Re: Function returning setof more than 1 table |