[ic] Subcatalogs and SQL databases
mike at perusion.com
Mon Nov 24 15:04:32 EST 2003
Quoting Thomas Weiss (pater.noster at gmx.net):
> 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
> Message __UNDEFINED_VARIABLE__
> ProductDir subcats/testsub1/products
> VariableDatabase variable
> ifdef PGSQL
> DatabaseDefault NO_ASCII_INDEX 1
> include dbconf/pgsql/pgsql.cfg
> # 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?
A little of both. The only Variable definitions available in a
Subcatalog config will be ones it makes prior to that. You don't
have access to the master catalog configuration (as that may have
not even been read yet).
> And if it is a feature
> could someone please provide me with some background?
> 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?
You have to remove the products/<tablename>.sql file. Then and only
then will it re-import.
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 <mike at perusion.com>
How far can you open your mind before your brains fall out?
More information about the interchange-users