diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2001-08-30 13:17:03 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2001-08-30 13:17:03 +0000 |
commit | 11193c8a200f54c766474340f723bb3a391e77f5 (patch) | |
tree | f35bacb8d61b13298af11025085a57567fe29e1e /src | |
parent | 7ecff3f39c88f3a9d35b4419145b2f95303f79c7 (diff) | |
download | postgresql-11193c8a200f54c766474340f723bb3a391e77f5.tar.gz postgresql-11193c8a200f54c766474340f723bb3a391e77f5.zip |
For INSERTs, one can now tab complete DEFAULT VALUES.
from Liam Stewart
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/tab-complete.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index d581b094bf0..745ae5881c4 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.35 2001/08/01 18:45:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.36 2001/08/30 13:17:03 petere Exp $ */ /*---------------------------------------------------------------------- @@ -576,15 +576,15 @@ psql_completion(char *text, int start, int end) /* Complete INSERT INTO with table names */ else if (strcasecmp(prev2_wd, "INSERT") == 0 && strcasecmp(prev_wd, "INTO") == 0) COMPLETE_WITH_QUERY(Query_for_list_of_tables); - /* Complete INSERT INTO <table> with "VALUES" or "SELECT" */ + /* Complete INSERT INTO <table> with "VALUES" or "SELECT" or "DEFAULT VALUES" */ else if (strcasecmp(prev3_wd, "INSERT") == 0 && strcasecmp(prev2_wd, "INTO") == 0) { - char *list_INSERT[] = {"SELECT", "VALUES", NULL}; + char *list_INSERT[] = {"DEFAULT VALUES", "SELECT", "VALUES", NULL}; COMPLETE_WITH_LIST(list_INSERT); } /* Insert an open parenthesis after "VALUES" */ - else if (strcasecmp(prev_wd, "VALUES") == 0) + else if (strcasecmp(prev_wd, "VALUES") == 0 && strcasecmp(prev2_wd, "DEFAULT") != 0) COMPLETE_WITH_CONST("("); /* LOCK */ |