PostgreSQL Install

PostgreSQL driver for MaVerick, Pete Jewell Created by modifying original mySQL driver written by Rob Colquhoun

Installation Instructions

You will need PostgreSQL installed. This version of the driver has been developed with v8.2 of PostgreSQL. An RPM installation (if you're on Linux) is OK, but make sure you elect to install the jdbc driver too. The rest of these instructions will assume this is the case.

Ensure you change the line in the /var/lib/pgsql/data/postgresql.conf file which allows tcpip connections to do so (tcpip_socket = true), then restart the database server (/etc/rc.d/init.d/postgresql restart).

The version of the driver shipped with v8.2 of PostgreSQL requires Java v1.3.x - you can just use the jre edition if you don't want to download the entire sdk version (and you're using a snapshot or release version).

Copy/move/link to the postgresql-8.2-505.jdbc3.jar file (located in /usr/share/pgsql if you installed PostgreSQL from RPM) into the $MAV_HOME/lib directory, where $MAV_HOME is the directory into which you have installed MaVerick. Alternatively, copy/move/link to the jdbc file into the $JAVA_HOME/jre/lib/ext directory. This makes the driver available to all Java programs you run.

Create a database for use with MaVerick, it doesn't matter what it's called, but it must support UNICODE encoding. For example, to create a database called maverick you would run -

$ createdb -E UNICODE maverick

Once the database has been created, you need to run some sql commands which create the PostgreSQL functions required by the driver (this will eventually be wrapped up in a CREATE-ACCT command).

Before loading the commands you have to enable PL/pgSQL as an available procedural language. You can do this with the following command, just substitute maverick for the name of your database -

    $ createlang plpgsql maverick

The easiest way to do this is to run the following command while in this directory, substituting the <> fields where appropriate -

$ psql -f READV.sql <your dbname> <your username>

Don't panic if you get a couple of errors relating to failed DROP commands.

Then update/create the following lines in your $MAV_HOME/etc/ file -

org.maverickdbms.database.pgsql.url=jdbc:postgresql://localhost/<your database name>
org.maverickdbms.database.pgsql.username=<your username>
org.maverickdbms.database.pgsql.password=<your password if any>
org.maverickdbms.database.pgsql.catalog=<catalog, same as db name>
org.maverickdbms.database.pgsql.schema=<schema ie public>

Replace the <> text with the correct values. You may need to change the localhost in the URL line to reflect the machine you actually have PostgreSQL installed on if it's not the same as MaVerick.

Finally run ant in this directory to build the driver, unless you downloaded a snapshot or release version, in which case the driver should already be built.

You're now ready to use MaVerick & PostgreSQL.

last update 2 May 2007