This is an old revision of the document!
Some of these notes come from the mailing list at http://open-ils.org/listserv.html.
These are the packages you will need to install for PostgreSQL on Red Hat or Fedora Core.
postgresql postgresql-contrib (contributed utilities and stored procedures) postgresql-devel postgresql-docs postgresql-libs (installs as a dependency with posgresql) postgresql-pl postgresql-server (installs as a dependency with postgresql-pl)
The current version of PostgreSQL appears to be 8.1.8.
You will need to start the PostgreSQL server manually the first time. Eventually, you may want to configure it to run at system startup.
service postgresql start
Switch to user postgres before running the commands below.
The tsearch2 utility is a full-text search extension for PostgreSQL. You should add this to template1 (which will subsequently be used to create your database).
bash-3.1$ psql template1 < /usr/share/pgsql/contrib/tsearch2.sql
You will also want to add tablefunc to template1. This installs crosstab (pivot) and connectby (tree descendancy) functions.
bash-3.1$ psql template1 < /usr/share/pgsql/contrib/tablefunc.sql
Change to the postgres user home directory and add the plpgsql language to template1. This allows any database created hereafter to use this language. It is considered safe and does not give any more access than regular SQL commands.
bash-3.1$ createlang plpgsql -d template1
Create a Unicode database named evergreen.
bash-3.1$ createdb -E UNICODE evergreen
Add plperl and plperlu languages to the evergreen database only. The plperlu language provides an environment for executing any Perl code so it isn't considered safe to add to template1.
bash-3.1$ createlang plperl -d evergreen bash-3.1$ createlang plperlu -d evergreen
If you need to start over with a fresh database these commands will drop the current evergreen and recreate it.
bash-3.1$ dropdb evergreen bash-3.1$ createdb -E UNICODE evergreen bash-3.1$ createlang plperl -d evergreen bash-3.1$ createlang plperlu -d evergreen