X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C60609DCA84 for ; Tue, 27 Dec 2005 23:43:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59587-09 for ; Tue, 27 Dec 2005 23:43:12 -0400 (AST) X-Greylist: delayed 18:20:23.305174 by SQLgrey- Received: from smtp1.netmagicians.com (smtp1.netmagicians.com [202.87.39.91]) by postgresql.org (Postfix) with ESMTP id 89AED9DCA82 for ; Tue, 27 Dec 2005 23:43:05 -0400 (AST) Received: from mailserver.tatashare.com (unknown [202.149.193.242]) by smtp1.netmagicians.com (Postfix) with ESMTP id BB2358EC3C9; Wed, 28 Dec 2005 09:12:44 +0530 (IST) Received: from aftabn463 (unknown [172.16.16.236]) by mailserver.tatashare.com (Postfix) with SMTP id EB2B83E4058; Wed, 28 Dec 2005 09:06:33 +0530 (IST) Reply-To: From: "Aftab Alam" To: "'Michael Fuhr'" Cc: "'postgre'" Subject: Re: sending mail from Postgres Date: Wed, 28 Dec 2005 09:07:52 +0530 Message-ID: <003c01c60b60$15e2d130$ec1010ac@aftabn463> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20051227174114.GA70280@winnie.fuhr.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-NetMagic-MailScanner-Information: Powered By NetMagic Mail Protection v1.0 X-NetMagic-MailScanner: Found to be clean X-NetMagic-MailScanner-From: aalam@tatashare.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200512/331 X-Sequence-Number: 20051 Hi Michael, thanks for your reply. you have mention that i can use plperlu, pltclu, or plpython for sending mail, i am using windows version of postgres(7.3.1), I have found that no dll in the postgres lib. for above mention language. kindly suggest, form where i can find those language lib, & how can i install those lib. thanx & Regards, aftab 7.3.1 -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Michael Fuhr Sent: Tuesday, December 27, 2005 11:11 PM To: Aftab Alam Cc: 'postgre' Subject: Re: [ADMIN] sending mail from Postgres On Tue, Dec 27, 2005 at 02:44:32PM +0530, Aftab Alam wrote: > How can i send mail form postgresql. You could write a function in a language like plperlu, pltclu, or plpython, but a problem with functions that have effects outside the database is that those effects can't be undone if the transaction rolls back. A common example is a trigger that sends email when a table is changed: if the trigger fires and then you roll back the transaction, it's too late to cancel the email. Depending on what you're doing it might be better to use LISTEN/NOTIFY and have a client program send email when it receives a notification (notifications are sent only when the transaction commits). -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq