trivial tab complete fixes - Mailing list pgsql-patches

From Neil Conway
Subject trivial tab complete fixes
Date
Msg-id 4250EAFB.5080700@samurai.com
Whole thread Raw
List pgsql-patches
I've applied the attached patch to HEAD: it fixes the spelling of the
"ABSOLUTE" keyword, and completes FETCH <sth> <sth> with FROM and IN,
rather than FROM and TO (since the latter is not valid syntax).

-Neil
Index: src/bin/psql/tab-complete.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql/src/bin/psql/tab-complete.c,v
retrieving revision 1.122
diff -c -r1.122 tab-complete.c
*** src/bin/psql/tab-complete.c    19 Mar 2005 23:27:08 -0000    1.122
--- src/bin/psql/tab-complete.c    4 Apr 2005 07:10:03 -0000
***************
*** 1186,1192 ****
               pg_strcasecmp(prev_wd, "MOVE") == 0)
      {
          static const char *const list_FETCH1[] =
!         {"ABSOLUT", "BACKWARD", "FORWARD", "RELATIVE", NULL};

          COMPLETE_WITH_LIST(list_FETCH1);
      }
--- 1186,1192 ----
               pg_strcasecmp(prev_wd, "MOVE") == 0)
      {
          static const char *const list_FETCH1[] =
!         {"ABSOLUTE", "BACKWARD", "FORWARD", "RELATIVE", NULL};

          COMPLETE_WITH_LIST(list_FETCH1);
      }
***************
*** 1201,1216 ****
      }

      /*
!      * Complete FETCH <sth1> <sth2> with "FROM" or "TO". (Is there a
!      * difference? If not, remove one.)
       */
      else if (pg_strcasecmp(prev3_wd, "FETCH") == 0 ||
               pg_strcasecmp(prev3_wd, "MOVE") == 0)
      {
!         static const char *const list_FROMTO[] =
!         {"FROM", "TO", NULL};

!         COMPLETE_WITH_LIST(list_FROMTO);
      }

  /* GRANT && REVOKE*/
--- 1201,1217 ----
      }

      /*
!      * 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_FROMIN[] =
!         {"FROM", "IN", NULL};

!         COMPLETE_WITH_LIST(list_FROMIN);
      }

  /* GRANT && REVOKE*/

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Update to download info in install docs
Next
From: Neil Conway
Date:
Subject: DELETE ... USING