*******************************************************************************
* Installation instructions for Unix
* (For Windows paths need to be adapted)
*******************************************************************************    

This instructions compile, install and initialize a PostgreSQL server instance
that only affects the postgresql-9.0.0-align folder. No files will be created or
moved to other directories on your system. Removing the folder
postgresql-9.0.0-align will remove all files related to this instance. The
instructions use the port 5400 to non interfere with already installed versions
of PostgreSQL, if you want to use an other port modify the -p 5400 parameter.

***************************************
* Requirements
***************************************

The requirements are the requirements to compile and run PostgreSQL.

For an Ubuntu 12.04 installation, these are the packages libreadline-dev and 
zlib1g-dev

See the INSTALL file in the "source" folder for further details.

***************************************
* Compilation and installation
***************************************

Move into the folder "source" and issue the following commands:

./configure --prefix=`pwd`/../server
make
make install

***************************************
* Create database cluster
***************************************

cd ..
./server/bin/initdb -D data

***************************************
* Create and populate database
*************************************** 

./server/bin/pg_ctl -D data -o "-F -p 5400" start 

./server/bin/createdb -p 5400 align

./server/bin/psql -p 5400 -d align -f data.sql

./server/bin/pg_ctl -D data -o "-F -p 5400" stop

***************************************
* Commands to start and stop server (port 5400)
***************************************

./server/bin/pg_ctl -D data -o "-F -p 5400" start

./server/bin/pg_ctl -D data -o "-F -p 5400" stop

***************************************
* Command to start client (port 5400)
***************************************
    
./server/bin/psql -p 5400 -d align

***************************************
* Example Queries
*************************************** 

See EXAMPLES.txt

***************************************
* Known bugs
***************************************

If you are using a gcc compiler version 4.8 or above there is a known bug
with PostgreSQL 9.0.0, which was used as the base for this implementation.
The code will compile, but will fail at performing "initdb".

In this case install gcc version 4.7 and add the following parameter to  
configure: CC='gcc-4.7 -m64'
So configure becomes: ./configure CC='gcc-4.7 -m64' --prefix=`pwd`/../server
