use the same names like postgres uses internally
[pharext/pharext.org] / config / sql / createdb.sh
1 #!/usr/bin/sh
2 #
3 # run as (postgresql) superuser
4
5 psql -e <<EOF
6 -- createuser -DRS pharext
7 CREATE
8 USER "pharext"
9 NOCREATEDB
10 NOREPLICATION
11 NOSUPERUSER
12 ;
13
14 -- createdb pharext -O pharext -E UTF8 -l en_US.UTF-8
15 CREATE
16 DATABASE "pharext"
17 OWNER "pharext"
18 TEMPLATE "template0"
19 ENCODING 'UTF-8'
20 LC_CTYPE 'en_US.UTF-8'
21 LC_COLLATE 'en_US.UTF-8'
22 ;
23
24 \c pharext
25
26 CREATE
27 EXTENSION "uuid-ossp"
28 ;
29
30 EOF