"22.3. Template Databases" documentation is incomplete

Started by PG Bug reporting formover 3 years ago6 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/manage-ag-templatedbs.html
Description:

The documentation for creating databases from templates is incomplete, and
should mention that access privileges are not copied. So, for example,
issuing:

create database newdb with template existingdb owner someuser;

results in the newly-created database lacking the access privileges that
exist in the template.

cf: https://www.postgresql.org/docs/13/manage-ag-templatedbs.html

#2Bruce Momjian
bruce@momjian.us
In reply to: PG Bug reporting form (#1)
Re: "22.3. Template Databases" documentation is incomplete

On Tue, Aug 9, 2022 at 08:33:11PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/manage-ag-templatedbs.html
Description:

The documentation for creating databases from templates is incomplete, and
should mention that access privileges are not copied. So, for example,
issuing:

create database newdb with template existingdb owner someuser;

results in the newly-created database lacking the access privileges that
exist in the template.

cf: https://www.postgresql.org/docs/13/manage-ag-templatedbs.html

I have created the attached patch to document this.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

Attachments:

template.difftext/x-diff; charset=us-asciiDownload
#3Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#2)
Re: "22.3. Template Databases" documentation is incomplete

On Sat, Oct 28, 2023 at 12:18:50PM -0400, Bruce Momjian wrote:

On Tue, Aug 9, 2022 at 08:33:11PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/manage-ag-templatedbs.html
Description:

The documentation for creating databases from templates is incomplete, and
should mention that access privileges are not copied. So, for example,
issuing:

create database newdb with template existingdb owner someuser;

results in the newly-created database lacking the access privileges that
exist in the template.

cf: https://www.postgresql.org/docs/13/manage-ag-templatedbs.html

I have created the attached patch to document this.

Sorry, I attached a _colorized_ diff; here is a normal one.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

Attachments:

template.difftext/x-diff; charset=us-asciiDownload+2-1
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: "22.3. Template Databases" documentation is incomplete

Bruce Momjian <bruce@momjian.us> writes:

Sorry, I attached a _colorized_ diff; here is a normal one.

The new sentence is fine in isolation, but this doesn't feel like
a great spot to put it. The preceding several lines are all about
copying of objects within the database, and this isn't. In
particular, the antecedent of "it" is unclear and is different
from what "it" means in the immediately preceding sentence.

It might be best to split the thing out into its own para?
Something like

action being taken when those databases are created.
</para>

+  <para>
+   However, <command>CREATE DATABASE</command> does not copy
+   database-level <command>GRANT</command> permissions attached to the
+   source database.  The new database has default permissions.
+  </para>
+
   <para>
    There is a second standard system database named

regards, tom lane

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#4)
Re: "22.3. Template Databases" documentation is incomplete

On Sat, Oct 28, 2023 at 02:42:06PM -0400, Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Sorry, I attached a _colorized_ diff; here is a normal one.

The new sentence is fine in isolation, but this doesn't feel like
a great spot to put it. The preceding several lines are all about
copying of objects within the database, and this isn't. In
particular, the antecedent of "it" is unclear and is different
from what "it" means in the immediately preceding sentence.

It might be best to split the thing out into its own para?
Something like

action being taken when those databases are created.
</para>

+  <para>
+   However, <command>CREATE DATABASE</command> does not copy
+   database-level <command>GRANT</command> permissions attached to the
+   source database.  The new database has default permissions.
+  </para>
+
<para>
There is a second standard system database named

Sure.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#6Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#5)
Re: "22.3. Template Databases" documentation is incomplete

On Sat, Oct 28, 2023 at 03:14:32PM -0400, Bruce Momjian wrote:

On Sat, Oct 28, 2023 at 02:42:06PM -0400, Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Sorry, I attached a _colorized_ diff; here is a normal one.

The new sentence is fine in isolation, but this doesn't feel like
a great spot to put it. The preceding several lines are all about
copying of objects within the database, and this isn't. In
particular, the antecedent of "it" is unclear and is different
from what "it" means in the immediately preceding sentence.

It might be best to split the thing out into its own para?
Something like

action being taken when those databases are created.
</para>

+  <para>
+   However, <command>CREATE DATABASE</command> does not copy
+   database-level <command>GRANT</command> permissions attached to the
+   source database.  The new database has default permissions.
+  </para>
+
<para>
There is a second standard system database named

Sure.

Separate paragraph version applied to all supported versions.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.