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

Commitbbb586f

Browse files
committed
Quick patch to adress a recent concern on the mailing list
about adding an errant "TO" when we already have a TO. SinceTO cannot be a valid column name (we must quote it), we cansimply ignore the tab-completion if the previous wordwas a "TO".Greg Sabino Mullane
1 parentb492c3a commitbbb586f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.129 2005/05/18 05:01:10 neilc Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.130 2005/05/25 22:12:05 momjian Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -827,7 +827,8 @@ psql_completion(char *text, int start, int end)
827827

828828
/* ALTER TABLE xxx RENAME yyy */
829829
elseif (pg_strcasecmp(prev4_wd,"TABLE")==0&&
830-
pg_strcasecmp(prev2_wd,"RENAME")==0)
830+
pg_strcasecmp(prev2_wd,"RENAME")==0&&
831+
pg_strcasecmp(prev_wd,"TO")!=0)
831832
COMPLETE_WITH_CONST("TO");
832833

833834
/* If we have TABLE <sth> DROP, provide COLUMN or CONSTRAINT */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp