#!/bin/bash
#####################################################################
INC=`pg_config --includedir`
CFLAGS="-I$INC"
LDFLAG='-lpq'
ECPGFLAG="-t -I$INC"
ecpg $ECPGFLAG test.pgc -o test.cpp
g++ $CFLAGS -c test.cpp
g++ -o TEST test.o $LDFLAGS
#####################################################################