Minor fixes for psql tab completion. Spell "absolute" like the English word,
authorNeil Conway <neilc@samurai.com>
Mon, 4 Apr 2005 07:19:44 +0000 (07:19 +0000)
committerNeil Conway <neilc@samurai.com>
Mon, 4 Apr 2005 07:19:44 +0000 (07:19 +0000)
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).

src/bin/psql/tab-complete.c

index 54f817853727b567886cd6dc5055f7dfd494b781..a2c4174a4e84dcd0cdcd2b591f44fe6648a76696 100644 (file)
@@ -1186,7 +1186,7 @@ psql_completion(char *text, int start, int end)
                         pg_strcasecmp(prev_wd, "MOVE") == 0)
        {
                static const char *const list_FETCH1[] =
-               {"ABSOLUT", "BACKWARD", "FORWARD", "RELATIVE", NULL};
+               {"ABSOLUTE", "BACKWARD", "FORWARD", "RELATIVE", NULL};
 
                COMPLETE_WITH_LIST(list_FETCH1);
        }
@@ -1201,16 +1201,17 @@ psql_completion(char *text, int start, int end)
        }
 
        /*
-        * Complete FETCH <sth1> <sth2> with "FROM" or "TO". (Is there a
-        * difference? If not, remove one.)
+        * Complete FETCH <sth1> <sth2> with "FROM" or "IN". These are
+        * 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 ||
                         pg_strcasecmp(prev3_wd, "MOVE") == 0)
        {
-               static const char *const list_FROMTO[] =
-               {"FROM", "TO", NULL};
+               static const char *const list_FROMIN[] =
+               {"FROM", "IN", NULL};
 
-               COMPLETE_WITH_LIST(list_FROMTO);
+               COMPLETE_WITH_LIST(list_FROMIN);
        }
 
 /* GRANT && REVOKE*/