Forum OpenACS Improvement Proposals (TIPs): Re: TIP #37 (Proposed): Queries in XQL file conventions

John's optional pre-processor idea is kind of interesting, but IMO probably not such a hot idea over all. Even if it worked 100% reliably, it would probably require significant extra maintenance, for in the end, no real gain. If the OpenACS project was much larger than it is and this sort of pre-processor was the only thing that would prevent a FreeBSD vs. NetBSD type of fork, then it would definitely be worth using. Otherwise, sounds like a nify solution in search of a real problem.

On the other hand, if that optional pre-processor is attractive and important purely because of performance problems (in even some cases) with handling the XQL files, then something else about the OpenACS XQL architecture or tools is probably wrong, and should be addressed separately.

Longer run, seems that Don has tentatively (hypothetically?) suggested eliminating the XQL querfiles altogether, and defining a simple syntax for putting all the db-specific SQL into the same Tcl files. Not merely a -sql switch for inline queries, but several at once, "-generic, -postgresql, and -oracle"

The main advantage I see there is it lets (indeed, forces) you to see the same query for all the databases together at once. Upside is this would push much greater cross-db knowledge, and help eliminate spurious drift and redundancy in the Oracle vs. Postgres queries. All "official" OpenACS packages are supposed to support both databases anyway, and this would make the work of doing so somewhat easier.

The downside of course, is that it does tie support for the different databases more closely together. In the past people seemed to think it advantageous that, at least in theory, some outside group could decide to add support for a 3rd database just by adding a whole bunch of new XQL files, without having to touch the rest of the toolkit at all. But given history of Oracle and PostgreSQL support, and the continual ongoing development of the OpenACS toolkit itself, I doubt that any such "just drop in support for a 3rd database" project would be that simple. My guess is it that in reality it would need extensive co-ordination and some changes from the core OpenACS developers no matter what, whether the SQL is all in separate XQL files or not. What do you think, is my guess here wrong?

But, really, Don's "-generic, -postgresql, -oracle" suggestion is a major change that would affect a lot of people, and nobody's going to do it anytime soon, right? (My guess is probably never, but not till OpenACS 5.1 at the very earliest.)

Six of one, half a dozen of the other...

Weighing the benefit of this proposal against the pain for newbies and old farts to learn yet another way of doing things, and the perceived inconsistency I vote to leave it at status quo.

If we change the way we deal with queries then we should rethink the whole thing and in that case I'd strongly prefer Don's (?) -generic, -oracle, -postgresql style. Until then, I'll happily use Bart's emacs extensions to make my life easier.