template0 database comment
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. +
Attachments:
/rtmp/template0.difftext/x-diffDownload+2-0
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.
regards, tom lane
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.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
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?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
On 12 March 2011 13:59, 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?
'original template database' ?
--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Thom Brown wrote:
On 12 March 2011 13:59, 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?'original template database' ?
I like that. Perhaps "unmodified template database'?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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.
--
http://linuxfinances.info/info/linuxdistributions.html
On Sat, Mar 12, 2011 at 9:14 AM, Bruce Momjian <bruce@momjian.us> wrote:
I like that. Perhaps "unmodified template database'?
"why" tends to be more important than "what", particularly to a
confused DBA who's trying to figure out "why do they have all these
extra databases???"
Perhaps...
"backup template database - normally immutable, used if template1 is corrupted"
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. +
On Sat, Mar 12, 2011 at 1:59 PM, Bruce Momjian <bruce@momjian.us> wrote:
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?
template0: unmodifiable pristine empty database
template1: default template for new databases
--
greg
Greg Stark wrote:
On Sat, Mar 12, 2011 at 1:59 PM, Bruce Momjian <bruce@momjian.us> wrote:
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?template0: unmodifiable pristine empty database
template1: default template for new databases
I think I like "unmodifiable empty database".
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Greg Stark <gsstark@mit.edu> writes:
On Sat, Mar 12, 2011 at 1:59 PM, Bruce Momjian <bruce@momjian.us> wrote:
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?
template0: unmodifiable pristine empty database
template1: default template for new databases
Yeah, I think that the right way to approach this is to have initdb
comment *both* of those databases. I don't like that specific wording
for template0 though. Maybe
template0: unmodified copy of original template1 database
template1: default template for new databases
The problem with Greg's wording is that it's falsifiable: it is possible
for someone to modify template0 if they're determined to mess things up.
So a description like "unmodifiable" is promising too much.
Shouldn't the "postgres" database get a comment too, while we're at it?
Perhaps "default database to connect to"?
regards, tom lane
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". ;-)
On Sat, Mar 12, 2011 at 5:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
The problem with Greg's wording is that it's falsifiable: it is possible
for someone to modify template0 if they're determined to mess things up.
So a description like "unmodifiable" is promising too much.
Eh, it's possible for someone to make any part of the documentation
wrong if they're determined to mess things up enough. "Empty" is not
even technically correct since it has all the system tables and stuff.
But I think there's a point of diminishing returns where if we try to
come up with something that's technically 100% true it won't help a
user understand the key attributes that make template0 useful. Under
normal usage it has no user objects in it and it is hard to change
that which tries to guarantee that that fact remains true.
--
greg
On Mar 12, 2011, at 12:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Greg Stark <gsstark@mit.edu> writes:
On Sat, Mar 12, 2011 at 1:59 PM, Bruce Momjian <bruce@momjian.us> wrote:
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?template0: unmodifiable pristine empty database
template1: default template for new databasesYeah, I think that the right way to approach this is to have initdb
comment *both* of those databases. I don't like that specific wording
for template0 though. Maybetemplate0: unmodified copy of original template1 database
template1: default template for new databasesThe problem with Greg's wording is that it's falsifiable: it is possible
for someone to modify template0 if they're determined to mess things up.
So a description like "unmodifiable" is promising too much.Shouldn't the "postgres" database get a comment too, while we're at it?
Perhaps "default database to connect to"?
A preposition is something you should try not to end a sentence with.
...Robert
On Sat, Mar 12, 2011 at 8:42 PM, Robert Haas <robertmhaas@gmail.com> wrote:
A preposition is something you should try not to end a sentence with.
Something to keep in mind when someone localises Postgres for Latin
which has this rule.
--
greg
On 03/12/2011 04:24 PM, Greg Stark wrote:
On Sat, Mar 12, 2011 at 8:42 PM, Robert Haas<robertmhaas@gmail.com> wrote:
A preposition is something you should try not to end a sentence with.
Something to keep in mind when someone localises Postgres for Latin
which has this rule.
I assume Robert's comment was in jest, since it was in breach of the
rule it was stating.
cheers
andrew
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 <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:
/rtmp/db.difftext/x-diffDownload+3-0
Tom Lane wrote:
Greg Stark <gsstark@mit.edu> writes:
On Sat, Mar 12, 2011 at 1:59 PM, Bruce Momjian <bruce@momjian.us> wrote:
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?template0: unmodifiable pristine empty database
template1: default template for new databasesYeah, I think that the right way to approach this is to have initdb
comment *both* of those databases. I don't like that specific wording
for template0 though. Maybetemplate0: unmodified copy of original template1 database
template1: default template for new databases
Tom, the current comment for "template1" is "default template database".
Do you like your above wording better? It does make it slighly longer.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Bruce Momjian <bruce@momjian.us> writes:
Tom Lane wrote:
Yeah, I think that the right way to approach this is to have initdb
comment *both* of those databases. I don't like that specific wording
for template0 though. Maybetemplate0: unmodified copy of original template1 database
template1: default template for new databases
Tom, the current comment for "template1" is "default template database".
Do you like your above wording better? It does make it slighly longer.
Actually that's Greg's wording. Yeah I do like it better. If you don't
already know what a template database is, "template1: default template
database" is going to convey precisely nothing to you. Greg's version
at least gives you the information that it has got something to do with
making new databases, which would probably be enough to prompt people to
go look in the right part of the docs.
regards, tom lane