DBD::Ingres -- an Ingres interface for Perl 5 using DBI. This is the Database Driver for the Ingres family of database products. It requires Ingres 6.4 or OpenIngres 1.0 or newer, DBI 1.00 or newer, Perl5.004 or newer. Note: There are indications of memory corruption problems with Perl5.005_03. As of now (1999.05.25) the advice is to use Perl5.005_02. Copyright (c) 1996,1997 Henrik Tougaard You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. New features: v0.20 1999.09.01 This has been running without problems on several machines here for some months now. Time to release it and see what (if anything) breaks. Still to be done: - linking on VMS (waiting for DBI to link w.o. problems on VMS). - compiling without tweeking on NT (ran out of tuits). - tracking the latest chenges in the DBI spec (meta data and cached statements to name the most obvious). V0.19_3 1999.05.25 - Cleanup of the code. Removal of some/all (?!!) of the core dumps. No longer 'unaligned access'. - Redo the check for re-preparation (still croak if a commit/rollback has invalidated the statement). Possibly fit for human comsumption. ;-} V0.19_2 1999.02.06 - Added support for threaded perls, thanks to Alan Murray V0.19_1 1998.11.11 This is the first test of the forthcoming release 0.20. This is not for public consumption - please use with care. - Don't export $sql_dbh etc as default. (Ingperl.pm) Warning: This may break code that uses one or more of: $sql_drh $sql_dbh $sql_sth $sql_debug $sql_rowcount Change: use Ingperl; to: use Ingperl( qw[ $sql_dbh $sql_sth ] ); - Added support for updateable cursors (experimental), Thanks to Dirk Koopman . - Upgrade to support DBI 1.00 (experimental): . re-prepare statement, that have gone out of scope (eq. after a commit/rollback etc). Just first bash at it :-(, ie. for now just keep tabs on whether the statement is invalidated by commit. . add the new meta-data fields (TYPE, SCALE, PRECISION) Ingres doesn't return the SCALE information so that is undef untill further notice! . first bash at type_info_all . added $dbh->table_info (so $dbh->tables also works thanks to DBI) . added $dbh->ping - Changed statement name from stmnt<12-digit-number> to st_, so that it maybe is possible to see which statement is executing from eg. ipm. This may have the adverse effect that Ingres runs out of buffer space, because it leaves all prepared statements in the ???-buffer untill a commit. This will only be a problem if you execute many different statements in a transaction. If this does become a problem please let me know. One solution is to allow the user to define the statement name if neccessary (eg. though the %attribs argument to prepare). - Cleaned up some code here and there. - OpenIngres 1.0 now requires patch 5301 (or later) as this fixes the unfortunate problem with nullability and outerjoins. The code to work around this problem is removed (it had strange sideeffects at times). This should not be a problem for OpenIngres 2.0 or later. It if definitely not a problem for Ingres 6.4; as outerjoins were introduced in OpenIngres. #### - Now builds cleanly on NT without changes to the makefile. #### - Now builds cleanly on VMS (again) - Now commits after inquiring for autocommit-state after connect. This removes the nedd for the commit in: $dbh = DBI->connect... $dbh->commit; $dbh->do("set lockmode...."); (Note #### = Not Yet Implemented) BEFORE BUILDING, TESTING AND INSTALLING this you will need to: Build, test and install Perl 5.004 (or newer) It is very important to test it and install it! Build, test and install the DBI module. It is very important to test it and install it! *** DBI must be at least version 1.00 *** BUILDING If Perl5 is installed do: perl Makefile.PL If Perl5 is NOT installed install it, and come back here later! Then do: make make test make install HP-UX users (and others) will have to build perl with static extensions: make perl make test make inst_perl See the MakeMaker docs for further: perldoc ExtUtils::MakeMaker The make test pass will ask for at databasename (if not given in one of the DBI environment variable (see DBI.pm for particulars). It will then create a table named 'testhththt' in this database, manipulate it and delete it again. It is important for the succes of the test that you have the neccesary Ingres permissions. The ingtest.pl script is a "quick" hack of the test for ingperl (the "old" perl4 interface). If it fails horribly, see below. Do NOT hand edit the generated Makefile unless you are completely sure you understand the implications! Always try to make changes via the Makefile.PL command line and/or editing the Makefile.PL. You should never need to make any changes. If you do *please* let me know so that I can try to make it automatic in a later release. KNOWN PROBLEMS: o sometime prepared statements don't work - they either give the wrong results, or they error out. The problem seems to have appeared with one of the later patches to Ingres... Work-around: reprepare the statement everytime round 8^{ o the arguments to &sql(connect) must be given in the order: database-name username other-options otherwise the check for username wil fail. o Problems have been reported on Digital Unix where the abflnk.opt files does not include '-ldnet_stub'. This will cause wierd errors during "make test" - somewhat like: Can't load './blib/arch/auto/DBD/Ingres/Ingres.so' for module DBD::Ingres: dlopen: Unresolved symbols at /usr/local/lib/perl5/alpha-dec_osf/5.00404/DynaLoader.pm line 166. include '-ldnet_stub' in your abflnk.opt to fix this. o Lenio Eric reports problems using GNU-ld on SunOS. The problems disappeared when he reverted to Sun's ld. Message was: "ld.so: Undefined symbol: _IIGCa_static" o A message somewhat like: install_driver(Ingres) failed: Can't load '....DBD/Ingres/Ingres.so' for module DBD::Ingres: dlopen: cannot load .... usually indicates that the shared Ingres library is not in the path for shraed libraries given in LD_LIBRARY_PATH TO DO LIST: o Add support for OpenIngres long datatypes. o Add a way to call database procedures. o Add cached statements o Track the changes in the DBI spec o Verify that DBD::Ingres work under Apache::DBI (and make neccesary changes) IF YOU HAVE PROBLEMS: Firstly, check the Frequently Asked Questions, Known Bugs and any other pertinent documents at: http://www.symbolstone.org/technology/perl/DBI If this does *not* resolve your problem, please post details to dbi-user@fugue.com and CC them to me at ht@datani.dk. Please include: 1. A complete log of a complete build, e.g.: perl Makefile.PL -v (do a make realclean first) make make test DBI_TRACE=3 make test 2. Full details of which version of Ingres/esql and Perl you're using. 3. The output of: perl -e 'use Config; print Config::myconfig()' 4. If you get a core dump, try to include a stack trace from it. If the stack trace mentions XS_DynaLoader_dl_load_file then rerun make test after setting the environment variable PERL_DL_DEBUG to 2. Similarly, get the Devel::CoreStack module and use it. 5. Please don't post problems to comp.lang.perl.misc or perl5-porters. 6. If you are not currently subscribed to the mailing list please subscribe via http://www.isc.org/dbi-lists.html Regards, Tim, Al & Henrik. Original document: (c)Tim Bunce Amendments: (c)Alligator Descartes Further amendments: (c)Henrik Tougaard