X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/611f7186fc07bd57346bdd31eee16f9c0a5d273a..fe789bea628b15229156c8a4272c2b6063c9b1a0:/src/plugins/postgres.sml?ds=sidebyside diff --git a/src/plugins/postgres.sml b/src/plugins/postgres.sml index f80fcea..6465377 100644 --- 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 createdb {user, dbname} = +fun createdb {user, dbname, encoding} = 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)