Re: template0 database comment - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: template0 database comment
Date
Msg-id 201103121424.p2CEOrT02177@momjian.us
Whole thread Raw
In response to Re: template0 database comment  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-hackers
Christopher Browne wrote:
> On Sat, Mar 12, 2011 at 8:59 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > Dave Page wrote:
> >> On 3/12/11, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> > Bruce Momjian <bruce@momjian.us> writes:
> >> >> 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.
> >> >
> >> >> + ? ? ? ? ?"COMMENT ON DATABASE template0 IS 'only used by pg_dump';\n",
> >> >
> >> > No objection to the concept, but the actual text of this comment is
> >> > approximately 100% wrong.
> >> >
> >>
> >> I'd like to lodge a formal objection to the use of the word
> >> 'approximately' in the above comment.
> >
> > OK, funny guys. ?;-) ?Can someone give me the right text. ?Obviously I
> > don' know what template0 is used for either. ?Is it pg_dumpall perhaps?
> 
> Whaa?!?!
> 
> pg_dump has nothing to do with it.  Only used by createdb
> 
> Possibilities include:
> - 'base template database'
> - 'base template (used if template1 is corrupted)'
> - 'backup template (use if template1 corrupted)'
> 
> Contrast with template1
> - 'default template for creation of new databases'
> 
> I dunno that those are the *best* wordings, but they may suggest one.

I thought the big deal with template0 was it was used to find items that
were added to template1 by pg_dumpall.

I think Thom's idea of not describing its use but its contents might be
best, maybe "unmodifiable template database".

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: template0 database comment
Next
From: Bruce Momjian
Date:
Subject: Re: Macros for time magic values