Tab Completion for CREATE DATABASE ... TEMPLATE ...

Поиск
Список
Период
Сортировка
От Sehrope Sarkuni
Тема Tab Completion for CREATE DATABASE ... TEMPLATE ...
Дата
Msg-id CAH7T-arpQFxfSQFOiq4z1QU5vidy+CxfeA3ZWFngF42c_85+1Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Список pgsql-hackers
We use "CREATE DATABASE foo TEMPLATE foo_bk" to restore development databases to a known snapshot (ex: prior to testing DB migrations). Currently psql only autocompletes "foo_bk" if it's marked as a template database. It's mildly inconvenient to have to type out the entire database name (as they're not marked as templates).

The CREATE DATABASE command allows a super user to use any database as the template, and a non-super user (with CREATEDB privilege) to use any database of which it's the owner.

The attached patch updates the psql "CREATE DATABASE ... TEMPLATE <tab>" completion to match what the command actually allows.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: PL/Pythonu - function ereport
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL Audit Extension