diff options
| author | Robert Haas <rhaas@postgresql.org> | 2015-11-06 22:59:47 -0500 | 
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2015-11-06 22:59:47 -0500 | 
| commit | af9773cf4cac235a32341b11864c4a0a9a22b6c1 (patch) | |
| tree | fef979571e72f3455e04e3e1272fb88e97997301 /src/bin/psql/tab-complete.c | |
| parent | 6e71dd7ce9766582da453f493bc371d64977282f (diff) | |
When completing ALTER INDEX .. SET, add an equals sign also.
Jeff Janes
Diffstat (limited to 'src/bin/psql/tab-complete.c')
| -rw-r--r-- | src/bin/psql/tab-complete.c | 13 | 
1 files changed, 11 insertions, 2 deletions
| diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 0e8d3951a29..b58ec14418f 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1216,8 +1216,7 @@ psql_completion(const char *text, int start, int end)  	/* ALTER INDEX <foo> SET|RESET ( */  	else if (pg_strcasecmp(prev5_wd, "ALTER") == 0 &&  			 pg_strcasecmp(prev4_wd, "INDEX") == 0 && -			 (pg_strcasecmp(prev2_wd, "SET") == 0 || -			  pg_strcasecmp(prev2_wd, "RESET") == 0) && +			 pg_strcasecmp(prev2_wd, "RESET") == 0 &&  			 pg_strcasecmp(prev_wd, "(") == 0)  	{  		static const char *const list_INDEXOPTIONS[] = @@ -1225,6 +1224,16 @@ psql_completion(const char *text, int start, int end)  		COMPLETE_WITH_LIST(list_INDEXOPTIONS);  	} +	else if (pg_strcasecmp(prev5_wd, "ALTER") == 0 && +			 pg_strcasecmp(prev4_wd, "INDEX") == 0 && +			 pg_strcasecmp(prev2_wd, "SET") == 0 && +			 pg_strcasecmp(prev_wd, "(") == 0) +	{ +		static const char *const list_INDEXOPTIONS[] = +		{"fillfactor =", "fastupdate =", "gin_pending_list_limit =", NULL}; + +		COMPLETE_WITH_LIST(list_INDEXOPTIONS); +	}  	/* ALTER LANGUAGE <name> */  	else if (pg_strcasecmp(prev3_wd, "ALTER") == 0 && | 
