Forum OpenACS Development: Re: Postgres functions callbacks?

Collapse
Posted by Dave Bauer on
Or simpler, wrap the plsql calls in a tcl procedure and add a callback on that.
Collapse
Posted by Malte Sussdorff on
Yes, obviously I would do that, but if you take a look at ]po[ that would mean to exchange it in nearly the whole code base. And if I were to go down that road (and Frank would allow that), I would use "xo::db::sql::im_project new" directly e.g. for the im_project__new function. The moment I use the xo::db functions I could use mixin classes or filters to achieve my goal.
Collapse
Posted by Tom Jackson on
I have an idea for postgres plpgsql: create a new pl function with the same name, but an additional param, a switch to do something else. You can write a new body to do whatever you want. Then you can use the old and new version anywhere.

If you use something like ttrace, you modify every call of the function.