Forum OpenACS Development: Re: Error in Oracle's acs_mail_lite queue insert

Collapse
Posted by Raúl Morales Hidalgo on
I had thought about inserting an "if oracle..." within the .tcl but seemed an ugly kludge, I'll look into doing it via pl/sql and pgsql like in forums as soon as I get back form holidays and will post back here.

Thanks!

Collapse
Posted by Jim Lynch on
You don't want to be checking for which database in tcl, because there is already a structure for that which you should always use if you're committing anything...

You should find dirs .../$service/packages/$yourpackage/sql/postgresql and .../$service/packages/$yourpackage/sql/oracle, if you would be defining pl/sql procs, they would go in the oracle dir...

Then, you can have queries in places like .../$service/packages/$yourpackage/www/somepage-oracle.xql and .../$service/packages/$yourpackage/www/somepage-postgresql.xql as well as .../$service/packages/$yourpackage/tcl/some-procs-postgresql.xql and .../$service/packages/$yourpackage/tcl/some-procs-oracle.xql and possibly other places as well; check documentation and source of openacs for details.