]> granicus.if.org Git - postgresql/blobdiff - src/bin/initdb/initdb.c
Allow CREATE/ALTER DATABASE to manipulate datistemplate and datallowconn.
[postgresql] / src / bin / initdb / initdb.c
index 5228f1342224efe830e309ec60633ec2c4b1c57f..a25965ce4c9c6338dd8e03895cb71e6e8e1f66cd 100644 (file)
@@ -2288,11 +2288,7 @@ make_template0(void)
        PG_CMD_DECL;
        const char **line;
        static const char *template0_setup[] = {
-               "CREATE DATABASE template0;\n",
-               "UPDATE pg_database SET "
-               "       datistemplate = 't', "
-               "       datallowconn = 'f' "
-               "    WHERE datname = 'template0';\n",
+               "CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;\n",
 
                /*
                 * We use the OID of template0 to determine lastsysoid