|
3 | 3 | *
|
4 | 4 | * Copyright 2000 by PostgreSQL Global Development Group
|
5 | 5 | *
|
6 |
| - * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.35 2001/08/01 18:45:50 momjian Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.36 2001/08/30 13:17:03 petere Exp $ |
7 | 7 | */
|
8 | 8 |
|
9 | 9 | /*----------------------------------------------------------------------
|
@@ -576,15 +576,15 @@ psql_completion(char *text, int start, int end)
|
576 | 576 | /* Complete INSERT INTO with table names */
|
577 | 577 | else if (strcasecmp(prev2_wd, "INSERT") == 0 && strcasecmp(prev_wd, "INTO") == 0)
|
578 | 578 | COMPLETE_WITH_QUERY(Query_for_list_of_tables);
|
579 |
| - /* Complete INSERT INTO <table> with "VALUES" or "SELECT" */ |
| 579 | + /* Complete INSERT INTO <table> with "VALUES" or "SELECT" or "DEFAULT VALUES" */ |
580 | 580 | else if (strcasecmp(prev3_wd, "INSERT") == 0 && strcasecmp(prev2_wd, "INTO") == 0)
|
581 | 581 | {
|
582 |
| - char *list_INSERT[] = {"SELECT", "VALUES", NULL}; |
| 582 | + char *list_INSERT[] = {"DEFAULT VALUES", "SELECT", "VALUES", NULL}; |
583 | 583 |
|
584 | 584 | COMPLETE_WITH_LIST(list_INSERT);
|
585 | 585 | }
|
586 | 586 | /* Insert an open parenthesis after "VALUES" */
|
587 |
| - else if (strcasecmp(prev_wd, "VALUES") == 0) |
| 587 | + else if (strcasecmp(prev_wd, "VALUES") == 0 && strcasecmp(prev2_wd, "DEFAULT") != 0) |
588 | 588 | COMPLETE_WITH_CONST("(");
|
589 | 589 |
|
590 | 590 | /* LOCK */
|
|
0 commit comments