pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
sending mail from Postgres
4+ messages / 3 participants
[nested] [flat]

* sending mail from Postgres
@ 2005-12-27 09:14 Aftab Alam <aalam@tatashare.com>
  2005-12-27 17:41 ` Re: sending mail from Postgres Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Aftab Alam @ 2005-12-27 09:14 UTC (permalink / raw)
  To: pgsql-admin

Hi there,

How can i send mail form postgresql.

any suggestion.

thanx & regards
aftab



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: sending mail from Postgres
  2005-12-27 09:14 sending mail from Postgres Aftab Alam <aalam@tatashare.com>
@ 2005-12-27 17:41 ` Michael Fuhr <mike@fuhr.org>
  2005-12-28 03:37   ` Re: sending mail from Postgres Aftab Alam <aalam@tatashare.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Fuhr @ 2005-12-27 17:41 UTC (permalink / raw)
  To: Aftab Alam <aalam@tatashare.com>; +Cc: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: sending mail from Postgres
  2005-12-27 09:14 sending mail from Postgres Aftab Alam <aalam@tatashare.com>
  2005-12-27 17:41 ` Re: sending mail from Postgres Michael Fuhr <mike@fuhr.org>
@ 2005-12-28 03:37   ` Aftab Alam <aalam@tatashare.com>
  2005-12-28 13:56     ` Re: sending mail from Postgres Jaime Casanova <systemguards@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Aftab Alam @ 2005-12-28 03:37 UTC (permalink / raw)
  To: 'Michael Fuhr' <mike@fuhr.org>; +Cc: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: sending mail from Postgres
  2005-12-27 09:14 sending mail from Postgres Aftab Alam <aalam@tatashare.com>
  2005-12-27 17:41 ` Re: sending mail from Postgres Michael Fuhr <mike@fuhr.org>
  2005-12-28 03:37   ` Re: sending mail from Postgres Aftab Alam <aalam@tatashare.com>
@ 2005-12-28 13:56     ` Jaime Casanova <systemguards@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Jaime Casanova @ 2005-12-28 13:56 UTC (permalink / raw)
  To: aalam@tatashare.com; +Cc: Michael Fuhr <mike@fuhr.org>; pgsql-admin

On 12/27/05, Aftab Alam <aalam@tatashare.com> wrote:
> 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),
>

on cygwin i guess... so you have to get a version of one  of those
languages (tcl, perl, python) for cygwin

> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>


--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-12-28 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-27 09:14 sending mail from Postgres Aftab Alam <aalam@tatashare.com>
2005-12-27 17:41 ` Michael Fuhr <mike@fuhr.org>
2005-12-28 03:37   ` Aftab Alam <aalam@tatashare.com>
2005-12-28 13:56     ` Jaime Casanova <systemguards@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox