DBMS Installation Notes for UnixODBC.

["UnixODBC" refers to the Perl module, and "unixODBC" refers to the
unixODBC ODBC run-time 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 and 2.2.1 
from EasySoft, with the following platform configurations:

    Operating System          DBMS
    ----------------          ----
    Debian GNU/Linux 2.2      MySQL 3.23.42 with MyODBC 3.51.02
    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, and unixODBC
installs its libraries, headers, and unixODBC uses /usr/local, and
those are the directories shown in the examples.

Make sure that the MySQL include files from the include subdirectory
of the source code archive got 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 scripts to terminate with "Broken Pipe" errors.  To catch
the socket signals, include a signal handler, like this one, in the
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

  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>';

