Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ... - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
Date
Msg-id CACjxUsMxmXL4BO-1RuP6_HNO5eA+7exFpW6ehUqK6wbB3zi0kg@mail.gmail.com
Whole thread Raw
In response to Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...  (Kevin Grittner <kgrittn@gmail.com>)
List pgsql-hackers
On Mon, Sep 12, 2016 at 7:55 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Kevin Grittner <kgrittn@gmail.com> writes:
>> But that gives incorrect results for the case I asked about earlier
>> on the thread, while the query I pushed gives correct results:
>
> AFAICS, my query gives correct results for that case.  bob is permitted
> to copy fred's databases db1 and postgres, or would be if he had createdb
> privileges.  The query you committed is flat wrong, because it doesn't
> account for database ownership being granted via role membership.

Ah, there was a flaw in my testing script.  It appeared from my
(flawed) testing that the inherited ownership wasn't enough to
allow use as a template.  With the script fixed I see that it does.

Sorry for the noise.  Will fix.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
Next
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [PATCH] Tab completion for ALTER TYPE …RENAME VALUE …