From: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
---|---|
To: | Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com> |
Cc: | Sehrope Sarkuni <sehrope(at)jackdb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ... |
Date: | 2016-09-11 17:34:49 |
Message-ID: | CACjxUsNvRsW0rHQ37gLcwe9=ZO4BNFoJE0Rk7YaqDX2JhqM8Aw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Sep 10, 2016 at 12:26 AM, Vitaly Burovoy
<vitaly(dot)burovoy(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2016-09-11 18:05:07 | Re: Parallel tuplesort (for parallel B-Tree index creation) |
Previous Message | Tom Lane | 2016-09-11 16:47:52 | Re: Useless dependency assumption libxml2 -> libxslt in MSVC scripts |