/**
 - $Id$
 */


Before setup you have to install postgresql headers.

   $cd PG_SRC_DIR
   $make install-all-headers


1. Make xpsql binary and deploy it.

	1.1 configure Makefile for your environment
		$emacs Makefile 
			-I/usr/local/pgsql/include/server

	1.2 make binary
	    $make clean;make
	    $make install

2. Create database
	$su - postgres -c "createdb --echo yourdb";

3. Create function intarray

	3.1 move to intarray directory
		$cd intaray
   
	3.2 edit move.sh and confirm your postgres src path
		$emacs make.sh
    		PGSRC=/usr/local/src/postgresql-7.3.3
   		$./make.sh
   		
4. initialize database, create scheme and functions.
	$cd ./sql
	$./init.sh
	
5. Set up ordering function
	$cd ../ordering
	$make clean;make
	$make up
	$./create.sh

5. build library for xpath and marshall
	$cd ../lib/stack
	$make clean;make
	
6. Set up xpath function
	$cd ../../xpath
	$make clean;make
	$make up
	$./create.sh
	
7. Set up marshallize function
	$cd ../marshall
	$make clean;make
	$make up
	$./create.sh

8. build and run bulkload
	$cd ../pgxload
	$make clean;make
	$./pgxload -u postgres -p pgpass -d xpsql ../test/xmark003.xml
	
9. create index
	$cd ../sql
	$./afterload.sh


[yet experimental stage]

* adding experimental dom level 2 support
	$cd ../sql
	$su - postgres -c "psql xpsql < `pwd`/dom_l2.sql"

