Automagically log changes in table

George Sakkis george.sakkis at gmail.com
Sat Mar 17 23:20:25 EDT 2007


On Mar 17, 7:59 pm, "aspineux" <aspin... at gmail.com> wrote:

> Hi
>
> You can get this using "triggers" and "stored procedures".
> These are SQL engine dependent! This is available for long time with
> postgress and only from version 5 with mysql.
> This let you write SQL code (Procedure) that will be called when
> "trigged" by an event like inserting new row, updating rows,
> deleting ....

I'd rather avoid triggers since I may have to deal with Mysql 4. Apart
from that, how can a trigger know the current user ? This information
is part of the context (e.g. an http request), not stored persistently
somewhere. It should be doable at the framework/orm level but I'm
rather green on Turbogears/SQLAlchemy.

George




More information about the Python-list mailing list