Forum OpenACS Development: Re: ways to insert and update db

Collapse
Posted by Torben Brosten on
That may be the best way pg-wise, Tom, but I neglected to include some scoping factors:

1. This logging is only for non-core packages, of applications that use the logging feature.

2. The logging should not be db specific (Oracle compatibility is a long-term goal).

A trigger would be nice ( http://philip.greenspun.com/sql/triggers.html is inspiring ), if it could capture the sql directly and save it into a general logging facility, but then come these questions: Is there a way to have a trigger capture sql for pg and oracle, and stuff it in a general table? How would this work for scheduled procs that don't supply user_id and other connection info we want logged in the "audit"/log table?

Unless those can be answered positively, I'm back to asking the first questions..

What other public registered procs are there to insert or update the db from an OpenACS thread, besides db_dml?