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