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

Commit9475aa9

Browse files
author
Neil Conway
committed
Minor enhancement to psql tab completion. If we see "CREATE TEMPORARY",
we can complete "TABLE". The previous coding only looked for "CREATE TEMP".Note that I didn't add TEMPORARY to the list of suggested completionsafter we've seen "CREATE", since TEMP is equivalent and more concise. Butif the user has already manually typed TEMPORARY, we may as wellcomplete TABLE for them.
1 parentc765ca2 commit9475aa9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 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.162 2007/04/2616:13:13 neilc Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.163 2007/04/2618:10:28 neilc Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -1107,9 +1107,10 @@ 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 with "TABLE" */
1110+
/* Complete CREATE TEMP/TEMPORARY with "TABLE" */
11111111
elseif (pg_strcasecmp(prev2_wd,"CREATE")==0&&
1112-
pg_strcasecmp(prev_wd,"TEMP")==0)
1112+
(pg_strcasecmp(prev_wd,"TEMP")==0||
1113+
pg_strcasecmp(prev_wd,"TEMPORARY")==0))
11131114
COMPLETE_WITH_CONST("TABLE");
11141115

11151116
/* CREATE TABLESPACE */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp