DBMS Installation Notes for UnixODBC.

[Note - "UnixODBC," refers to the Perl module, and, "unixODBC," 
refers to the unixODBC ODBC driver manager libraries.]

1. Notes about various DBMS's.
   - MySQL
   - PostgreSQL
2. Installing Test Databases


1. DBMS Installation Notes

UnixODBC has been tested with unixODBC versions 2.2.0 - 2.2.6 
from EasySoft, with the following platform configurations:

    Operating System          DBMS
    ----------------          ----
    Debian GNU/Linux 2.2      MySQL 3.23.42 with MyODBC 3.51.02
    Debian GNU/Linux 3.0      MySQL 3.23.49 with MyODBC 3.51.02
                              PostgreSQL 7.2.5
                              PostgreSQL 7.3.3
    Solaris 7                 MySQL 3.23.42 with MyODBC 3.51.02
    Solaris 8                 PostgreSQL 7.2.1


- MySQL

MySQL needs to be configured with the option
--enable-thread-safe-client before building.  The default installation
of MySQL installs everything in /usr/local/mysql. unixODBC installs its 
libraries, headers in /usr/local.  Those are the directories shown in 
the examples.

Make sure that the MySQL include files from the include subdirectory
of the source code archive get installed in /usr/local/mysql/include/mysql.

On Linux systems, be sure to add the MySQL library directory,
/usr/local/mysql/lib/mysql, to /etc/ld.so.conf, and then run ldconfig.
On Solaris, add the directory to $LD_LIBRARY_PATH.

MyODBC needs to be configured with the unixODBC and MySQL 
configurations:

# ./configure \
> --with-mysql-includes=/usr/local/mysql/include/mysql \
> --with-unixODBC=/usr/local   

- PostgreSQL

The following options configure PostgreSQL for unixODBC:

# ./configure --enable-odbc --with-unixodbc \
> --with-odbcinst=/usr/local/etc

UnixODBC.pm is written for the unixODBC driver lib libodbcpsql.so.2.0.0.
It has not been tested with the PostgreSQL native ODBC driver
libpsqlodbc.so.0.27.

PostgreSQL's internal processes reopen one socket for efficiency.
This can cause Unix to signal an pipe error if the socket overflows,
and causes Perl scripts to terminate with, "Broken Pipe," errors.  To 
catch the socket signals, include a signal handler, like this one, in 
Perl script:

$SIG{PIPE} = sub { print "SIGPIPE: $!\n" };


Installing Test Databases

The later tests in the test.pl script depend on the installation
of the gutenberg.titles and gutenberg.files tables and data.  

  1. MySQL:

     # /usr/local/mysql/bin/mysql --user=root --password=root <mysql.ins

Be sure to substitute the user name and password in the example above 
of the user that has the correct privileges for creating the database
and tables and loading the data. 

  2. PostgreSQL:

     # su postgres
     # /usr/local/pgsql/bin/createdb gutenberg
     # /usr/local/pgsql/bin/psql gutenberg <postgres.ins
     # /usr/local/pgsql/bin/psql gutenberg 
     gutenberg=# copy titles from '<full path of titles.dat>';
     gutenberg=# copy files from '<full path of files.dat>';

