Skip to content
Snippets Groups Projects
Commit 8bbe905a authored by Neil Conway's avatar Neil Conway
Browse files

Minor fixes for psql tab completion. Spell "absolute" like the English word,

not the brand of vodka. Complete FETCH <sth> <sth> with FROM and IN, not
FROM and TO (which is still pretty incomplete, but at least its the right
syntax).
parent dba561f9
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2005, PostgreSQL Global Development Group * Copyright (c) 2000-2005, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.122 2005/03/19 23:27:08 tgl Exp $ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.123 2005/04/04 07:19:44 neilc Exp $
*/ */
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
...@@ -1186,7 +1186,7 @@ psql_completion(char *text, int start, int end) ...@@ -1186,7 +1186,7 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp(prev_wd, "MOVE") == 0) pg_strcasecmp(prev_wd, "MOVE") == 0)
{ {
static const char *const list_FETCH1[] = static const char *const list_FETCH1[] =
{"ABSOLUT", "BACKWARD", "FORWARD", "RELATIVE", NULL}; {"ABSOLUTE", "BACKWARD", "FORWARD", "RELATIVE", NULL};
COMPLETE_WITH_LIST(list_FETCH1); COMPLETE_WITH_LIST(list_FETCH1);
} }
...@@ -1201,16 +1201,17 @@ psql_completion(char *text, int start, int end) ...@@ -1201,16 +1201,17 @@ psql_completion(char *text, int start, int end)
} }
/* /*
* Complete FETCH <sth1> <sth2> with "FROM" or "TO". (Is there a * Complete FETCH <sth1> <sth2> with "FROM" or "IN". These are
* difference? If not, remove one.) * equivalent, but we may as well tab-complete both: perhaps some
* users prefer one variant or the other.
*/ */
else if (pg_strcasecmp(prev3_wd, "FETCH") == 0 || else if (pg_strcasecmp(prev3_wd, "FETCH") == 0 ||
pg_strcasecmp(prev3_wd, "MOVE") == 0) pg_strcasecmp(prev3_wd, "MOVE") == 0)
{ {
static const char *const list_FROMTO[] = static const char *const list_FROMIN[] =
{"FROM", "TO", NULL}; {"FROM", "IN", NULL};
COMPLETE_WITH_LIST(list_FROMTO); COMPLETE_WITH_LIST(list_FROMIN);
} }
/* GRANT && REVOKE*/ /* GRANT && REVOKE*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment