Re: Pet Peeves?

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Guy Rouillier <guyr-ml1(at)burntmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Pet Peeves?
Date: 2009-02-05 11:08:34
Message-ID: 4136ffa0902050308ic07db5bw1aa7e28e54b423ec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 4, 2009 at 6:42 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
> As A.M. says elsewhere, it would be good to have a trigger that fired a
> NOTIFY that was picked up by a scheduled job that LISTENs every 10
> minutes for certain events.
>
> We need a place for code that is *not* directly initiated by a user's
> actions, yet works as part of a closed loop system.

Can't you do this today in about three lines of your favourite
scripting language?

I used to do this in perl on Oracle and that was without anything like
LISTEN/NOTIFY to optimize it. Web pages just inserted a record and
went on about their business while a worker daemon scanned for new
records and generated notification mails.

The problem with trying to push everything into the database is that
it ends up sucking your entire application into the database. That
limits your choice of languages and tools, and also creates a huge
bottleneck.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-02-05 11:35:29 Re: Pet Peeves?
Previous Message Thom Brown 2009-02-05 11:06:51 Re: Automatic database upgrade