Forum OpenACS Q&A: xql files and db version

Collapse
Posted by bill kellerman on
I'm using postgresql 7.3.4 and there have been a bunch of instances of sql breaking in pages.  I know that 7.3.4 isn't the recommended version, but I'd like to stick with it if I can.  I've been able to fix the sql problems I've run into -- mostly a couple of different things that happen in a lot of places.

If sql queries have been separated out into .xql files by db type, can this be taken one step further by db type version?  amazing-package-postgresql-7.2.1.xql, amazing-package-7.3.4.xql, amazing-package-oracle-20i.xql...  so that  it's easier to support version-specific sql changes?

Or is there a better way within the file itself?

Collapse
Posted by Jade Rubick on
Derek, I don't know about your other questions, but if you find fixed like that, please post them as patches on bug-tracker, so that they get into the code base.
Collapse
Posted by Don Baccus on
Also please fix them without breaking the 7.2 version if you know how ... if not, rather than a patch file you may want to post the change in the bug report body (so we don't accidently apply the patch and break 7.2 support) with a comment pointing  out what changed so we can try to figure out a patch that works for both.

We could break out query files by version - that's why we implemented that level of granularity in the query dispatcher.

But in practice thus far we've been able to do our version migrations without doing so.  With PG we've tried to support the current and current-less-one major version - at the moment PG 7.2.x and 7.3.x.  OpenACS 5.0 will support Oracle 9i and 8i, and PG 7.2/7.3 (PG 7.4 is still in beta).