1 -- This file is intended to be called by eg_db_config.pl
3 -- If manually calling:
4 -- Connect to the postgres database initially
5 -- Specify the database to create as -vdb_name=DATABASE
6 -- Specify the postgres contrib directory as -vcontrib_dir=CONTRIBDIR
7 -- You can get the contrib directory using pg_config --sharedir and adding a /contrib to it
9 -- NOTE: This file does not do transactions
10 -- This is intentional. Please do not wrap in BEGIN/COMMIT.
11 DROP DATABASE IF EXISTS :db_name;
13 CREATE DATABASE :db_name TEMPLATE template0 ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C';
17 --CREATE LANGUAGE plperl;
18 CREATE LANGUAGE plperlu;
20 -- This dance is because :variable/blah doesn't seem to work when doing \i
21 -- But it does when doing \set
22 -- So we \set to a single variable, then use that single variable with \i
23 \set load_file :contrib_dir/pgxml.sql
25 \set load_file :contrib_dir/hstore.sql