Re: template0 database comment

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Christopher Browne <cbbrowne(at)gmail(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: template0 database comment
Date: 2011-03-12 14:24:53
Message-ID: 201103121424.p2CEOrT02177@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Browne wrote:
> On Sat, Mar 12, 2011 at 8:59 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Dave Page wrote:
> >> On 3/12/11, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> > Bruce Momjian <bruce(at)momjian(dot)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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-03-12 14:31:28 Re: Macros for time magic values
Previous Message Christopher Browne 2011-03-12 14:24:23 Re: template0 database comment