Forum OpenACS Development: ltree and tsearch2.sql

Collapse
Posted by Malte Sussdorff on
I was wondering, as tsearch2.sql should be run for search and ltree.sql should be run for XoWIKI for each new OpenACS installation, if it would not make sense to copy both files into the OpenACS trunk and keep them updated instead of having the user remember all the time that he needs to run both for each new OpenACS installation.

I know that this is getting messing as we need to figure out if tseach2 and ltree was acutally compiled into PG before we can run those scripts, but assuming standard distributions will come with tsearch2 compiled, it is definitely helpful for new users.

Or maybe I am just raising an issue where there is none. I just stumbled upon it some time ago and my method of loading both into the template1 is not foolproof either 😊

Collapse
2: Re: ltree and tsearch2.sql (response to 1)
Posted by Gustaf Neumann on
tsearch2 and ltree depend on the postgres version, so including these in the OpenACS repository opens another can of worms. In my opinion the best places to add these are
- at the end of the postgres compilation (compile both modules and add them to template1), or
- after createdb (make sure the modules are compiled and run both sql scripts against the new database)

Not sure, which binary distributions come with these database modules compiled.

Collapse
4: Re: ltree and tsearch2.sql (response to 2)
Posted by Malte Sussdorff on
Good points, thanks. So I will just leave them in the template1 as per my installations instructions. It is just causing (not to be concerned of) errors when you load a dumpfile into a freshly created database (which is based on template1) as the basic tables already exist. But well, that is the downside of the convenience not to have them to load after createdb (which might actually be on a different remote server). Thanks for the quick reply.
Collapse
3: Re: ltree and tsearch2.sql (response to 1)
Posted by Dave Bauer on
The tsearch2-driver package has code that checks if tsearch2.sql is already installed and if not, tries to find it and load it upon install. Its not fool proof but it helps.

Gustaf is correct, since we support at least 2 versions of PostgreSQL and tsearch2 is often updated or backported independent of PostgreSQL it doesn't make sense to try to keep it in the OpenACS tree. You need to install tsearch2 anyway to get tsearch2.so so if you want the tsearch2-driver package to work.