On Tue, 25 Jun 2002, Tom Lane wrote:
> My opinion is that the *preferred* way would involve having a background
> client-side task that watches for things to do (eg via NOTIFY/LISTEN),
> and then updates the database to indicate that it's done it. This
> doesn't require any unsafe PL programming at all, but it does mean extra
> work to set up a suitable client task. An example would make a great
> contrib item ...
I actually have implemented just that, but it requires patches to DBD::Pg
to do a "wait until event happens". I'll dig it out and submit to contrib