Re: Background triggers?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Dick Visser <visser(at)terena(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Background triggers?
Date: 2009-08-19 19:47:49
Message-ID: 407d949e0908191247g7b3696cdxac554cb10b374663@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Aug 19, 2009 at 8:23 PM, Dick Visser<visser(at)terena(dot)org> wrote:
>
> Is there a way to trigger stuff using NOTIFY/LISTEN, but WITHOUT an
> external client doing the magic? Some kind of internal Postgres function
> that listens for any changes, and then does the magic itself, without
> tying up any 'real' clients for the duration of that magic?

What do you mean "tying up"? Even if there was no client an internal
process would be "tying up" the same resources as if there was one.

In my experience it's a lot more flexible having an external process
connecting to the database anyways since it means you can use whatever
language you like, whatever libraries you like, etc. You can also use
other resources, close and open the connection, start and stop
transactions, etc. Anything within the database has a lot more
restrictions.

--
greg
http://mit.edu/~gsstark/resume.pdf

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Aras Angelo 2009-08-20 00:20:45 trying to alter column
Previous Message Tom Lane 2009-08-19 19:45:34 Re: Background triggers?