HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Specifying encoding on database creation
[hcoop/domtool2.git]
/
src
/
plugins
/
postgres.sml
diff --git
a/src/plugins/postgres.sml
b/src/plugins/postgres.sml
index
f80fcea
..
6465377
100644
(file)
--- a/
src/plugins/postgres.sml
+++ b/
src/plugins/postgres.sml
@@
-26,9
+26,11
@@
fun adduser {user, passwd} =
fun passwd _ = SOME "We don't use PostgreSQL passwords."
fun passwd _ = SOME "We don't use PostgreSQL passwords."
-fun createdb {user, dbname} =
+fun createdb {user, dbname
, encoding
} =
Option.map (fn s => "Error executing CREATE DATABASE script:\n" ^ s)
Option.map (fn s => "Error executing CREATE DATABASE script:\n" ^ s)
- (Slave.shellOutput [Config.Postgres.createdb, user, " ", dbname])
+ (Slave.shellOutput [Config.Postgres.createdb,
+ " ", user, " ", dbname,
+ case encoding of NONE => "" | SOME e => " " ^ e])
fun dropdb {user, dbname} =
Option.map (fn s => "Error executing DROP DATABASE script:\n" ^ s)
fun dropdb {user, dbname} =
Option.map (fn s => "Error executing DROP DATABASE script:\n" ^ s)