Forum OpenACS Development: Re: The query dispatcher and Oracle version dependency

Collapse
Posted by Peter Marklund on
Just to clarify what happens - the query dispatcher silently refuses to load queries at bootstrap time that have a version number higher than what is returned by [db_version] (the value of which is hard coded in db-init-checks-oracle.tcl). When executing the query at page request time you get an error message saying that the query is missing. It is not obvious that this problem arises because of the version number in the xql file. This is why I want to issue an error message in the log file at bootstrap time.

Here is the comment where the database version is hardcoded:

# DRB: I've got the SQL to pick the version to drop in later...what we really want,
# though, is Oracle's "compat version" number and I'm not sure how to get it (it is
# reported as 8.1.0 during the Oracle installation process)
nsv_set ad_database_version . "8.1.6"

Can we replace this with a query for the real version? If we did, the problems with the 8.1.7 version numbers would go away for me. However, I'm sure those queries would run just fine with 8.1.6 so we should probably change to that. The fact that all version numbers for Oracle queries are set to 8.1.6 seems somewhat arbitrary to me. 99% of the queries would probably run fine with much older versions. It seems that what we currently have is a system wide requirement of 8.1.6. However if that is the case, why not remove all version numbers from the query files and instead check the db version number on bootstrap?

What seems to make the most sense to me is to have db version requirements on a package level. A user of a package won't really care if some queries require 8.1.1 if others require say 8.1.5. It will always be the higher number that matters.