template0 database comment - Mailing list pgsql-hackers

From Bruce Momjian
Subject template0 database comment
Date
Msg-id 201103112225.p2BMPl503872@momjian.us
Whole thread Raw
Responses Re: template0 database comment
List pgsql-hackers
People are confused about what template0 is for, so I created the
attached one-line patch to add a database comment to template0. No
initdb, I assume, becuase it is just a comment.

I plan to work on more system table and view comments for 9.2.

--
  Bruce Momjian  <bruce@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..ba9b688
*** 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 'only used by pg_dump';\n",
+
          /*
           * Finally vacuum to clean up dead rows in pg_database
           */

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: new keywords in 9.1
Next
From: Tom Lane
Date:
Subject: Re: template0 database comment