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

Commit8e90c54

Browse files
author
Neil Conway
committed
Another tweak for tab completion of CREATE TEMP. Instead of only
completing CREATE { TEMP | TEMPORARY } TABLE, we should also suggestVIEW and SEQUENCE. Per Greg Sabino Mullane.
1 parent16fb5da commit8e90c54

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.163 2007/04/2618:10:28 neilc Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.164 2007/04/2622:25:56 neilc Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -1107,11 +1107,16 @@ psql_completion(char *text, int start, int end)
11071107
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables,NULL);
11081108

11091109
/* CREATE TABLE */
1110-
/* Complete CREATE TEMP/TEMPORARY with"TABLE" */
1110+
/* Complete"CREATE TEMP/TEMPORARY" withthe possible temp objects */
11111111
elseif (pg_strcasecmp(prev2_wd,"CREATE")==0&&
11121112
(pg_strcasecmp(prev_wd,"TEMP")==0||
11131113
pg_strcasecmp(prev_wd,"TEMPORARY")==0))
1114-
COMPLETE_WITH_CONST("TABLE");
1114+
{
1115+
staticconstchar*constlist_TEMP[]=
1116+
{"SEQUENCE","TABLE","VIEW",NULL };
1117+
1118+
COMPLETE_WITH_LIST(list_TEMP);
1119+
}
11151120

11161121
/* CREATE TABLESPACE */
11171122
elseif (pg_strcasecmp(prev3_wd,"CREATE")==0&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp