From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Joseph Nahmias <joe@nahmias.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: create database with template doesn't copy database ACL
Date: Sun, 14 Jun 2020 23:24:56 -0400
Message-ID: <1092722.1592191496@sss.pgh.pa.us> (raw)
In-Reply-To: <20200615031102.GA12121@momjian.us>
References: <159136749445.7029.12571169059565185790@wrigleys.postgresql.org>
<20200612212951.GB6813@momjian.us>
<20200614072613.GA21852@nahmias.net>
<20200615031102.GA12121@momjian.us>
Bruce Momjian <bruce@momjian.us> writes:
> I am unclear if we should be copying the CONNECT and TEMPORARY
> attributes or documenting that CREATE DATABASE does not copy them.
We should absolutely not copy them.
As an example, it'd make sense for an admin to revoke CONNECT on a
template database, just to help ensure that nobody modifies it.
If that propagated to every created database, it would be a complete
fail.
Moreover, since the ACLs of an object depend quite a bit on who the owner
is, it'd make no sense to copy them to a new object that has a different
owner. The granted-by fields would be wrong, if nothing else.
In practice, CREATE DATABASE never has copied any database-level property
of the template DB, only its contents. (Well, I guess it copies encoding
and collation by default, but those are descriptive of the contents.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, joe@nahmias.net, pgsql-hackers@postgresql.org
Subject: Re: create database with template doesn't copy database ACL
In-Reply-To: <1092722.1592191496@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox