Index: src/bin/psql/tab-complete.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/psql/tab-complete.c,v retrieving revision 1.133 diff -c -r1.133 tab-complete.c *** src/bin/psql/tab-complete.c 22 Jun 2005 21:14:30 -0000 1.133 --- src/bin/psql/tab-complete.c 1 Jul 2005 18:34:20 -0000 *************** *** 926,941 **** pg_strcasecmp(prev_wd, "USER") == 0) COMPLETE_WITH_QUERY(Query_for_list_of_users); ! /* BEGIN, END, COMMIT, ABORT */ else if (pg_strcasecmp(prev_wd, "BEGIN") == 0 || pg_strcasecmp(prev_wd, "END") == 0 || - pg_strcasecmp(prev_wd, "COMMIT") == 0 || pg_strcasecmp(prev_wd, "ABORT") == 0) { static const char *const list_TRANS[] = {"WORK", "TRANSACTION", NULL}; COMPLETE_WITH_LIST(list_TRANS); } /* RELEASE SAVEPOINT */ else if (pg_strcasecmp(prev_wd, "RELEASE") == 0) --- 926,948 ---- pg_strcasecmp(prev_wd, "USER") == 0) COMPLETE_WITH_QUERY(Query_for_list_of_users); ! /* BEGIN, END, ABORT */ else if (pg_strcasecmp(prev_wd, "BEGIN") == 0 || pg_strcasecmp(prev_wd, "END") == 0 || pg_strcasecmp(prev_wd, "ABORT") == 0) { static const char *const list_TRANS[] = {"WORK", "TRANSACTION", NULL}; COMPLETE_WITH_LIST(list_TRANS); + } + /* COMMIT */ + else if(pg_strcasecmp(prev_wd, "COMMIT") == 0) + { + static const char *const list_COMMIT[] = + {"WORK", "TRANSACTION", "PREPARED", NULL}; + + COMPLETE_WITH_LIST(list_COMMIT); } /* RELEASE SAVEPOINT */ else if (pg_strcasecmp(prev_wd, "RELEASE") == 0) *************** *** 944,950 **** else if (pg_strcasecmp(prev_wd, "ROLLBACK") == 0) { static const char *const list_TRANS[] = ! {"WORK", "TRANSACTION", "TO SAVEPOINT", NULL}; COMPLETE_WITH_LIST(list_TRANS); } --- 951,957 ---- else if (pg_strcasecmp(prev_wd, "ROLLBACK") == 0) { static const char *const list_TRANS[] = ! {"WORK", "TRANSACTION", "TO SAVEPOINT", "PREPARED", NULL}; COMPLETE_WITH_LIST(list_TRANS); }