Re: Using Postgresql as application server

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Chris Travers <chris(dot)travers(at)gmail(dot)com>
Cc: Darren Duncan <darren(at)darrenduncan(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Using Postgresql as application server
Date: 2011-08-18 10:40:05
Message-ID: 87mxf780l6.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Chris Travers <chris(dot)travers(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jehan-Guillaume (ioguix) de Rorthais 2011-08-18 10:40:16 Re: Unable to login with phppgadmin on a remote host
Previous Message Karuna Karpe 2011-08-18 09:47:24 help in postgresql

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2011-08-18 10:48:02 Re: Using Postgresql as application server
Previous Message AI Rumman 2011-08-18 10:39:31 max_stack_depth error, need suggestion