[psql] patch to fix ordering in words_after_create array
Hi All,
While looking at the code around tab-complete.c, I
found the ordering in words_after_create array is not
correct for DEFAULT PRIVILEGES, which been added
under below commit:
commit d7d77f3825122bde55be9e06f6c4851028b99795
Author: Peter Eisentraut <peter_e@gmx.net>
Date: Thu Mar 16 18:54:28 2017 -0400
psql: Add completion for \help DROP|ALTER
PFA patch to fix the same.
Thanks,
Rushabh Lathia
www.EnterpriseDB.com
Attachments:
tab-complete-words_after_create.patchtext/x-patch; charset=US-ASCII; name=tab-complete-words_after_create.patchDownload
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index f749406..02a1571 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -999,8 +999,8 @@ static const pgsql_thing_t words_after_create[] = {
{"CONFIGURATION", Query_for_list_of_ts_configurations, NULL, THING_NO_SHOW},
{"CONVERSION", "SELECT pg_catalog.quote_ident(conname) FROM pg_catalog.pg_conversion WHERE substring(pg_catalog.quote_ident(conname),1,%d)='%s'"},
{"DATABASE", Query_for_list_of_databases},
- {"DICTIONARY", Query_for_list_of_ts_dictionaries, NULL, THING_NO_SHOW},
{"DEFAULT PRIVILEGES", NULL, NULL, THING_NO_CREATE | THING_NO_DROP},
+ {"DICTIONARY", Query_for_list_of_ts_dictionaries, NULL, THING_NO_SHOW},
{"DOMAIN", NULL, &Query_for_list_of_domains},
{"EVENT TRIGGER", NULL, NULL},
{"EXTENSION", Query_for_list_of_extensions},
On Fri, Mar 24, 2017 at 7:10 AM, Rushabh Lathia
<rushabh.lathia@gmail.com> wrote:
While looking at the code around tab-complete.c, I
found the ordering in words_after_create array is not
correct for DEFAULT PRIVILEGES, which been added
under below commit:commit d7d77f3825122bde55be9e06f6c4851028b99795
Author: Peter Eisentraut <peter_e@gmx.net>
Date: Thu Mar 16 18:54:28 2017 -0400psql: Add completion for \help DROP|ALTER
PFA patch to fix the same.
Committed.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers