HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DBMS database creation
[hcoop/domtool2.git]
/
src
/
plugins
/
postgres.sml
diff --git
a/src/plugins/postgres.sml
b/src/plugins/postgres.sml
index
a267e4f
..
87ba252
100644
(file)
--- a/
src/plugins/postgres.sml
+++ b/
src/plugins/postgres.sml
@@
-26,6
+26,13
@@
fun adduser user =
else
SOME "Error executing CREATE USER script"
else
SOME "Error executing CREATE USER script"
-val _ = Dbms.register ("postgres", {adduser = adduser})
+fun createdb {user, dbname} =
+ if Slave.shell [Config.Postgres.createdb, user, " ", dbname] then
+ NONE
+ else
+ SOME "Error executing CREATE DATABASE script"
+
+val _ = Dbms.register ("postgres", {adduser = adduser,
+ createdb = createdb})
end
end