On 2019-Nov-08, Daniel Gustafsson wrote: > Agreed. I like your suggestion, or the inverse of it: "a database without any > user defined objects".
Here's a proposed patch. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>From b394a1b2b6227d68e0cd2c32afb75ef3bfd317ef Mon Sep 17 00:00:00 2001 From: Alvaro Herrera <alvhe...@alvh.no-ip.org> Date: Fri, 8 Nov 2019 10:09:05 -0300 Subject: [PATCH] No more virgins --- doc/src/sgml/manage-ag.sgml | 5 +++-- doc/src/sgml/ref/create_database.sgml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/manage-ag.sgml b/doc/src/sgml/manage-ag.sgml index 0154064e50..a939ce8313 100644 --- a/doc/src/sgml/manage-ag.sgml +++ b/doc/src/sgml/manage-ag.sgml @@ -199,11 +199,12 @@ createdb -O <replaceable>rolename</replaceable> <replaceable>dbname</replaceable should never be changed after the database cluster has been initialized. By instructing <command>CREATE DATABASE</command> to copy <literal>template0</literal> instead - of <literal>template1</literal>, you can create a <quote>virgin</quote> user + of <literal>template1</literal>, you can create a user database that contains none of the site-local additions in <literal>template1</literal>. This is particularly handy when restoring a <literal>pg_dump</literal> dump: the dump script should be restored in a - virgin database to ensure that one recreates the correct contents + database without any user-defined objects, to ensure that one recreates + the correct contents of the dumped database, without conflicting with objects that might have been added to <literal>template1</literal> later on. </para> diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index 4014f6703b..e56aca6d30 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -54,7 +54,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable> system database <literal>template1</literal>. A different template can be specified by writing <literal>TEMPLATE <replaceable class="parameter">name</replaceable></literal>. In particular, - by writing <literal>TEMPLATE template0</literal>, you can create a virgin + by writing <literal>TEMPLATE template0</literal>, you can create a database containing only the standard objects predefined by your version of <productname>PostgreSQL</productname>. This is useful if you wish to avoid copying -- 2.20.1