Re: Listen and do something daemon

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: KM <km(at)xacrasis(dot)netx>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Listen and do something daemon
Date: 2010-09-25 13:39:36
Message-ID: AANLkTin+hNCJUY_GcRY++SirAt9UgzMfTWBodu5k0rR3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 24, 2010 at 9:42 PM, KM <km(at)xacrasis(dot)netx> wrote:
> Does this program already exist?
>
>   $ listen-and-do --database=foo --listen-for="somenotification" \
>      --then-do="some-script"
>
> It will daemonize itself, issue a 'LISTEN somenotification' on the
> database foo, and on each NOTIFY will run some-script.

I think the "libpq Example Program 2" could be very easily adapted for this:
http://www.postgresql.org/docs/current/static/libpq-example.html

Josh

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-09-25 14:03:42 Re: psql copy command - 1 char limitation on delimiter
Previous Message Andre Lopes 2010-09-25 12:32:53 Re: How to use pg_restore with *.sql file?