[ic] IC_TEST_CREATE table

Mike Heins interchange-users@lists.akopia.com
Fri May 11 11:26:01 2001


Quoting Chad Leigh, Shire.Net LLC (chad@shire.net):
> As an example, the IC_TEST_CREATE table was not being dropped when 
> configuring the database because the "drop table ic_test_creste" statement 
> is not SQL92 compliant, according to the FrontBase support team.  It needs 
> to be "drop table ic_test_create cascade" or "drop table ic_test_create 
> restrict".  Is there a way with interchange to specify, similar to the 
> abpve CREATE_SQL parameter, a DROP_SQL type parameter to specify howto drop 
> the IC_TEST_CREATE table?

Sure -- add it to the code, which is quite easy. It would pretty much
be:

    my $drop_statement = $config->{IC_DROP_TEST_SQL} || "drop table _TABLE_";
    $drop_statement =~ s/\b_TABLE_\b/$table/g;

> 
> Additionally, inserting sample values.  TIMESTAMP or DATE values, according 
> to QL92 standard as outlined by FrontBase support, needs to be:
> 
> "INSERT INTO FOO(COL) VALUES (DATE '2001-05-02')" or whatever
> and not "INSERT INTO FOO(COL) VALUES ('2001-05-02')" (no DATE specifier)
> 
> Is there a way to give hints to the interchange config scripts on how to 
> construct the SQL insert statements with the sample data?
> 
> They reference the latest CJ Date SQL book as containing the SQL92 
> standard.  I don't have tatbook available so I have to take their word for 
> it.
> 

Hmm. Never heard of that one. This is a much more difficult issue, as
it essentially has to "filter" an insert value. Hard to do, but I have
looked at ways to do this in the past. There is even some filter capability
that is there, but I am not sure it would work on table creation.

This seems to be more properly a DBD driver issue, as placeholders need
to be able to generate statements like this.

-- 
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

If you like what you're gettin', keep doin' what you're doin'. -- Hector