summaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-02-24 10:06:36 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-02-24 10:06:36 +0000
commit7babccb91504fd4a958ff778547af1a8cbc1f8f2 (patch)
treece41105b1add6e2c61ae7acc8e3ee6c2175a41af /src/bin/psql/tab-complete.c
parentf73bed308a8ccaea9082634f417966f7beb71614 (diff)
Add the possibility to specify an explicit validator function for foreign-data
wrappers (similar to procedural languages). This way we don't need to retain the nearly empty libraries, and we are more free in how to implement the wrapper API in the future.
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r--src/bin/psql/tab-complete.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index d4b977bd6d2..363857542ea 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.179 2009/01/01 17:23:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.180 2009/02/24 10:06:34 petere Exp $
*/
/*----------------------------------------------------------------------
@@ -749,7 +749,7 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp(prev2_wd, "WRAPPER") == 0)
{
static const char *const list_ALTER_FDW[] =
- {"LIBRARY", "OPTIONS", "OWNER TO", NULL};
+ {"VALIDATOR", "OPTIONS", "OWNER TO", NULL};
COMPLETE_WITH_LIST(list_ALTER_FDW);
}
@@ -1258,12 +1258,7 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp(prev4_wd, "FOREIGN") == 0 &&
pg_strcasecmp(prev3_wd, "DATA") == 0 &&
pg_strcasecmp(prev2_wd, "WRAPPER") == 0)
- COMPLETE_WITH_CONST("LIBRARY");
-
- else if (pg_strcasecmp(prev5_wd, "DATA") == 0 &&
- pg_strcasecmp(prev4_wd, "WRAPPER") == 0 &&
- pg_strcasecmp(prev2_wd, "LIBRARY") == 0)
- COMPLETE_WITH_CONST("LANGUAGE C");
+ COMPLETE_WITH_CONST("VALIDATOR");
/* CREATE INDEX */
/* First off we complete CREATE UNIQUE with "INDEX" */