#! /bin/bash
# CREATEDB Copyright (2008) Gwyneth Morrison
# Build an empty MSSQL compat postgress DB

. mssymbols

if [ $# -lt 1 ]
then
	echo Usage $0 DBNAME
	exit 1
fi
DBNAME=$1
echo Creating database $DBNAME
$PSQLBIN/createdb -U $PGUSERNAME $DBNAME
# Add compat functions and uuid functions
$PSQLBIN/psql -a -U $PGUSERNAME $DBNAME < mscompat.sql  
$PSQLBIN/psql -a -U $PGUSERNAME $DBNAME < uuid-ossp.sql 
