postgresql triggers to update GUI?

Mikhail Terekhov terekhov at emc.com
Mon Nov 26 17:41:13 EST 2001


Look for LISTEN/NOTIFY in the Postgres documentation.
You need:
1. Create trigger on the tables in question which sends
    a notify <notify name>
2. In your application use LISTEN <notify name>
    after connecting to the database and then periodically
    check for notify.

Regards
Mikhail

Robert Nikander wrote:

> Hi,
> 
> I am writing a python program that uses a postgresql db backend.  I would
> like to update the gui whenever a change in certain tables occurs, so it
> would be nice to use triggers rather than generating the 'events' when I
> update the db.  That way I get cascading changes.  Does anyone know of a
> python module that supports postresql triggers? ie: you can create a
> trigger that calls a python function?  Is there another solution here
> that I am missing?
> 
> Thanks,
> Rob
> 




More information about the Python-list mailing list