another tiny fix (tab-completion) for \ef in psql
While answering a question about something else, I spotted another
omission regarding \ef - no tab-completion for it.
This is the trivial patch, not sure if there's any benefit in trying
to be more specific.
--
Andrew (irc:RhodiumToad)
Attachments:
ef-complete.patchtext/x-patchDownload
Index: src/bin/psql/tab-complete.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/tab-complete.c,v
retrieving revision 1.182
diff -c -r1.182 tab-complete.c
*** src/bin/psql/tab-complete.c 6 Apr 2009 15:50:59 -0000 1.182
--- src/bin/psql/tab-complete.c 8 Apr 2009 01:38:47 -0000
***************
*** 2218,2223 ****
--- 2218,2226 ----
else if (strncmp(prev_wd, "\\d", strlen("\\d")) == 0)
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tisv, NULL);
+ else if (strcmp(prev_wd, "\\ef") == 0)
+ COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_functions, NULL);
+
else if (strcmp(prev_wd, "\\encoding") == 0)
COMPLETE_WITH_QUERY(Query_for_list_of_encodings);
else if (strcmp(prev_wd, "\\h") == 0 || strcmp(prev_wd, "\\help") == 0)
"Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
Andrew> While answering a question about something else, I spotted
Andrew> another omission regarding \ef - no tab-completion for it.
Andrew> This is the trivial patch, not sure if there's any benefit in
Andrew> trying to be more specific.
I missed a bit there - it should probably be in backslash_commands too.
--
Andrew (irc:RhodiumToad)
Andrew Gierth wrote:
"Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
Andrew> While answering a question about something else, I spotted
Andrew> another omission regarding \ef - no tab-completion for it.Andrew> This is the trivial patch, not sure if there's any benefit in
Andrew> trying to be more specific.I missed a bit there - it should probably be in backslash_commands too.
OK, patch applied and I added it to backslash_commands too.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +