On Sat, Sep 10, 2016 at 12:26 AM, Vitaly Burovoy <vitaly.buro...@gmail.com> wrote:
> According to the documentation since 9.2 till devel a database can be > used as a template if it has a "datistemplate" mark or by superusers > or by their owners. Hm. I wonder whether the following failure of "bob" to use the specified template is intended or a bug. It seems to make sense to sort that out before looking at the related tab completion. test=# checkpoint; CHECKPOINT test=# create role fred with createdb; CREATE ROLE test=# create user bob; CREATE ROLE test=# grant fred to bob; GRANT ROLE test=# alter database postgres owner to fred; ALTER DATABASE test=# set role fred; SET test=> create database db1 template postgres; CREATE DATABASE test=> reset role; RESET test=# set role bob; SET test=> create database db2 template postgres; ERROR: permission denied to create database Opinions on whether this is a bug or correct behavior? -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers