Peter Eisentraut wrote: > On l?r, 2011-03-12 at 12:01 -0500, Tom Lane wrote: > > Shouldn't the "postgres" database get a comment too, while we're at > > it? Perhaps "default database to connect to"? > > That's not actually true, though. Maybe it's the "default database used > by administration programs"? In practice it might be "some otherwise > unused database that's occasionally useful". ;-)
Based on previous discussion I have developed a patch to add comments for 'postgres' and 'template0' databases: postgres=> \l+ ... postgres | default administrative database template0 | unmodifiable empty database template1 | default template database -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c new file mode 100644 index acd2514..2397932 *** a/src/bin/initdb/initdb.c --- b/src/bin/initdb/initdb.c *************** make_template0(void) *** 1976,1981 **** --- 1976,1983 ---- "REVOKE CREATE,TEMPORARY ON DATABASE template1 FROM public;\n", "REVOKE CREATE,TEMPORARY ON DATABASE template0 FROM public;\n", + "COMMENT ON DATABASE template0 IS 'unmodifiable empty database';\n", + /* * Finally vacuum to clean up dead rows in pg_database */ *************** make_postgres(void) *** 2011,2016 **** --- 2013,2019 ---- const char **line; static const char *postgres_setup[] = { "CREATE DATABASE postgres;\n", + "COMMENT ON DATABASE postgres IS 'default administrative database';\n", NULL };
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers