Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11193c8

Browse files
committed
For INSERTs, one can now tab complete DEFAULT VALUES.
from Liam Stewart
1 parent7ecff3f commit11193c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/psql/tab-complete.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
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 $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -576,15 +576,15 @@ psql_completion(char *text, int start, int end)
576576
/* Complete INSERT INTO with table names */
577577
elseif (strcasecmp(prev2_wd,"INSERT")==0&&strcasecmp(prev_wd,"INTO")==0)
578578
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"*/
580580
elseif (strcasecmp(prev3_wd,"INSERT")==0&&strcasecmp(prev2_wd,"INTO")==0)
581581
{
582-
char*list_INSERT[]= {"SELECT","VALUES",NULL};
582+
char*list_INSERT[]= {"DEFAULT VALUES","SELECT","VALUES",NULL};
583583

584584
COMPLETE_WITH_LIST(list_INSERT);
585585
}
586586
/* Insert an open parenthesis after "VALUES" */
587-
elseif (strcasecmp(prev_wd,"VALUES")==0)
587+
elseif (strcasecmp(prev_wd,"VALUES")==0&&strcasecmp(prev2_wd,"DEFAULT")!=0)
588588
COMPLETE_WITH_CONST("(");
589589

590590
/* LOCK */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp