Re: Using Postgresql as application server

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Using Postgresql as application server
Дата
Msg-id 87mxf780l6.fsf@hi-media-techno.com
обсуждение исходный текст
Ответ на Re: Using Postgresql as application server  (Chris Travers <chris.travers@gmail.com>)
Ответы Re: Using Postgresql as application server  (Chris Travers <chris.travers@gmail.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: AI Rumman
Дата:
Сообщение: max_stack_depth error, need suggestion
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Using Postgresql as application server