From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Chris Travers <chris.travers@gmail.com>
Cc: Darren Duncan <darren@darrenduncan.net>
Cc: pgsql-general@postgresql.org
Subject: Re: Using Postgresql as application server
Date: Thu, 18 Aug 2011 12:40:05 +0200
Message-ID: <87mxf780l6.fsf@hi-media-techno.com> (raw)
In-Reply-To: <CAKt_Zft3XH_9bdcS-mZM6aSJ4824r7H3eFAx4CWwdoDwr=vb0A@mail.gmail.com>
References: <CAN2Y=uPjF14F5A9JXj02_vaPw4TMR0WGQid_w80xt4sC8o4qGg@mail.gmail.com>
<4E498536.9080109@darrenduncan.net>
<CAKt_Zft3XH_9bdcS-mZM6aSJ4824r7H3eFAx4CWwdoDwr=vb0A@mail.gmail.com>
Chris Travers <chris.travers@gmail.com> writes:
> I want an email to go out to the ordering manager when the quantity I
> have of an item drops below the re-order point. I also want this
> email NOT to go out if the transaction rolls back. (Wait, the order
> of 50000 widgets I just processed rolled back because it isn't to a
> valid customer! We normally only sell 50000 per year anyway. No need
> for the email.)
Just use PGQ and be done with it. You have transactional and
asynchronous behavior. Typically, a trigger would produce events in the
queue, and a separate daemon will consume the queue and send emails.
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: dimitri@2ndQuadrant.fr, chris.travers@gmail.com, darren@darrenduncan.net, pgsql-general@postgresql.org
Subject: Re: Using Postgresql as application server
In-Reply-To: <87mxf780l6.fsf@hi-media-techno.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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