This patch adds PostgreSQL support for WikkiTikkiTavi. It modifies database creation script, adds a Postgres-database class and alters some of the SQL queries. The patch is written so that the user can select either MySQL or PostgreSQL with the global DBClass variable. MySQL functionality has not been tested after applying this patch because I don't have it installed.

Installation

Download the patch here: http://jmz.iki.fi/pub/tavi_postgres.tar.bz2

Locate your Tavi installation and go to it's parent directory: E.g. if you have installed Tavi to /usr/local/lib/tavi/tavi, go to /usr/local/lib/tavi

Unpack the archive using the tar command: "tar xfj path/to/patch". It contains two files: tavi/lib/pgdb.php and tavi_postgress.diff

The pgdb.php file must be placed in tavi-installation-path/lib/pgdb.php. The default tavi-installation-path is tavi. If you unpack the archive in the parent directory of you installation, the file is automatically placed right.

Apply the patch: "patch -p0 < tavi_postgres.diff" You must be in the parent directory of your Tavi's installation to do this.

Create a PostgreSQL database for Tavi
cd tavi/install
perl ./create-db.pl --dbi=Pg dbname dbuser dbpasswd [table_prefix [dbserver]]

Configure your Tavi by adding $DBClass = "dbpg" variable to your config.php file.

Switching from MySQL to PostgreSQL

If you have already installed Tavi with MySQL, you can do so by following the instructions here: http://jmz.iki.fi/blog.php/programming/converting_mysql_database_to_postgresql

Patch home page

The "official" homepage for this patch is in my downloads page here: http://jmz.iki.fi/download.php/en/Tavi+Patches

Comments

If you have comments, or suggestions, please post them here, or send me an email. My email address is jmz@iki.fi.