Tab completion for ALTER ... SET SCHEMA

Поиск
Список
Период
Сортировка
От andreas
Тема Tab completion for ALTER ... SET SCHEMA
Дата
Msg-id 1292636094.3586.14.camel@jansson
обсуждение исходный текст
Ответы Re: Tab completion for ALTER ... SET SCHEMA  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

It has annoys me every time I want to move a table to another schema
that it completes to SET SCHEMA TO DEFAULT after a couple of presses of
the tab key. So today I decided to get off my lazy ass to write a tiny
patch to fix this behaviour. :)

My first patch for PostgreSQL so a question: Should I add this to the
open commitfest?

----

*** a/src/bin/psql/tab-complete.c
--- b/src/bin/psql/tab-complete.c
*************** psql_completion(char *text, int start, i
*** 1387,1392 ****
--- 1387,1399 ----              pg_strcasecmp(prev_wd, "USER") == 0)
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
 
+     /* ALTER <object> <name> SET SCHEMA */
+     else if (pg_strcasecmp(prev4_wd, "ALTER") == 0 &&
+             pg_strcasecmp(prev2_wd, "SET") == 0  &&
+             pg_strcasecmp(prev_wd, "SCHEMA") == 0)
+         COMPLETE_WITH_QUERY(Query_for_list_of_schemas);
+ 
+  /* BEGIN, END, ABORT */     else if (pg_strcasecmp(prev_wd, "BEGIN") == 0 ||              pg_strcasecmp(prev_wd,
"END")== 0 ||
 

Regards,
Andreas Karlsson




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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: plperlu problem with utf8
Следующее
От: Robert Haas
Дата:
Сообщение: Re: unlogged tables vs. GIST