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

From Vitaly Burovoy
Subject Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
Date
Msg-id CAKOSWNkK2i+VUNYAP6G+qDv_o31CtCzEPt6wDFnj=vX=CQLDsA@mail.gmail.com
Whole thread Raw
In response to Tab Completion for CREATE DATABASE ... TEMPLATE ...  (Sehrope Sarkuni <sehrope@jackdb.com>)
Responses Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
Re: [REVIEW] Tab Completion for CREATE DATABASE ... TEMPLATE ...
List pgsql-hackers
Hello Sehrope Sarkuni,

I have reviewed the patch.
It is very simple (only an SQL query in the "psql" application changed).

It applies at the top of master.
It implements completion database names ("<X>") for commands like
"CREATE DATABASE ... TEMPLATE <X>".
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.
Previous implementation checked only "datistemplate" mark.

Tested manually in versions 9.2 and 10devel, I hope it can be
back-patched to all supported versions.
No documentation needed.

Mark it as "Ready for committer".


P.S.: While I was reviewing I simplified SQL query: improved version
only 2 seqscans instead of 3 seqscans with an inner loop in an
original one.
Please find a file "tab-complete-create-database-improved.patch" attached.

--
Best regards,
Vitaly Burovoy

Attachment

pgsql-hackers by date:

Previous
From: Vitaly Burovoy
Date:
Subject: Re: identity columns
Next
From: Pavel Stehule
Date:
Subject: Re: IF (NOT) EXISTS in psql-completion