Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
Дата
Msg-id 21272.1473684928@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...  (Kevin Grittner <kgrittn@gmail.com>)
Ответы Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-hackers
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.

> There is absolutely no question that the query you suggest is
> wrong;

Please provide some evidence of that.

> the only case I had to think about very hard after
> establishing that CREATEDB was not inherited was when bob owned a
> database but did not have CREATEDB permission.

I agree that we should not look at createdb here.  If we did, the
effect would be that for a user without createdb, psql would refuse
to offer any completions, which seems more confusing than helpful.
(If it were the tab completion's code to enforce that, which it isn't,
surely it should have complained much earlier in the command.)
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vitaly Burovoy
Дата:
Сообщение: Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...