[ic] Subcatalogs and SQL databases

Stefan Hornburg racke at linuxia.de
Mon Nov 24 21:22:09 EST 2003

On Mon, 24 Nov 2003 19:57:02 +0100
Thomas Weiss <pater.noster at gmx.net> wrote:

> Hi folks,
> I've been playing around with using Interchange with subcatalogs and SQL
> databases and a few questions have arisen.
> Mainly I'm trying to build a subcatalog which is sharing everything
> except the various databases with the main catalog. I'm currently using
> Interchange 4.9.9.
> I've been using the following config for the subcatalog:
> # BOC
> ParseVariables Yes
> ProductDir subcats/testsub1/products
> VariableDatabase variable
> ifdef PGSQL
> DatabaseDefault NO_ASCII_INDEX 1
> include dbconf/pgsql/pgsql.cfg
> endif
> # EOC
> The strange thing is that the message directive must be there in order
> for the setup to work. Or more exactly the undefined variable must have
> been interpolated. If I leave it out or unset ParseVariables the
> variables defined in the variable database (the subcatalog's one) will
> not be available inside the configuration file and so the database setup
> will fail. Is this a bug or is this a feature? And if it is a feature
> could someone please provide me with some background?

It might be a bug.

> The next question is about importing databases from the text files.
> Interchange has correctly (for the main catalog) used the sql database
> I have configured it to use and on first start created some tables
> inside it from the databases in the products directory. But I wonder
> if there is a way to tell Interchange explicitly to recreate the tables
> in the SQL database. As far as I understand the documentation states
> the tables will (possibly) be recreated if the files inside the products
> directory change. But issuing a "touch products/*" does not cause
> Interchange to recreate the tables. Neither does dropping the tables
> inside the SQL database manually, which just results in the database
> server complaining about accessing non-existant tables. So how
> exactly does Interchange decide when to recreate the tables?

IC recreates a table if there is no corresponding xxx.sql file in the
products directory. An alternative is to specify NoImportExternal Yes
in catalog.cfg and create/import the needed databases manually.

> Also I wonder if it is possible to have Interchange automatically
> import data for a subcatalog. With the above setup it won't even try to
> import data into the SQL database. Loading a page from the subcatalog
> simply results in an SQL error.

Crystal ball failure ...

> I would be glad if someone could give me a hint or some pointers into
> the right direction.

Consider the use of AutoLoad to implement subcatalogs - this depends
on the kind of your project.


LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

More information about the interchange-users mailing list