Search Postgresql Archives

Re: Python + listen/notify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 10, 2012 at 3:56 PM, Filipe Brandão <fg.brandao@xxxxxxxxx> wrote:
> Hi all.
> I needed to have a trigger firing after a commit, but allready realized it's not possible.
> As i searched upon a solution i came across the LISTEN / NOTIFY. I haven't yet realized exactly what i can do with it, but can i use it to run a simple python script located out my DB?
> Can't run it inside the DB since i need to do it after the completion of a few triggers (after commit).

Certainly: your python program should stay connected to the database,
waiting to receive the NOTIFYs, and then take appropriate action. See:
  http://packages.python.org/psycopg2/advanced.html#asynchronous-notifications

Josh

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux