1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Peter Eisentraut
2009-02-24 10:06:36 +00:00
parent f73bed308a
commit 7babccb915
28 changed files with 452 additions and 626 deletions

View File

@ -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" */