On Sun, Nov 16, 2008 at 08:08:11PM -0500, Darren Govoni wrote:
>  I googled around a bit, but couldn't see if SQLObject (or any Python DB
> API) supports triggers. I want to call some python code when a
> particular database action has occurred

   Triggers, as far as I understand them, are SQL-only things, i.e. they
occur inside the backend and never call back to the application. Hence
Python DB API doesn't support triggers - there is nothing Python can do
about triggers. To declare a trigger the application just needs to issue
a CREATE TRIGGER query - and that's all about it at the Python side.

   Some additional thoughts. PostgreSQL supports asynchronous client
notification using LISTEN/NOTIFY statements, but these statements are
non-standard, and I don't know how well Python DB API drivers for Pg
support notifications.
   You can write triggers in Python on the server-side using plpython
Postgres plugin, but this is server-side, and has nothing with DB API.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to