3
3
*
4
4
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
5
5
*
6
- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.134 2005/07/23 21:05:47 tgl Exp $
6
+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.135 2005/07/28 22:14:30 momjian Exp $
7
7
*/
8
8
9
9
/*----------------------------------------------------------------------
@@ -927,16 +927,23 @@ psql_completion(char *text, int start, int end)
927
927
pg_strcasecmp (prev_wd ,"USER" )== 0 )
928
928
COMPLETE_WITH_QUERY (Query_for_list_of_users );
929
929
930
- /* BEGIN, END,COMMIT, ABORT */
930
+ /* BEGIN, END, ABORT */
931
931
else if (pg_strcasecmp (prev_wd ,"BEGIN" )== 0 ||
932
932
pg_strcasecmp (prev_wd ,"END" )== 0 ||
933
- pg_strcasecmp (prev_wd ,"COMMIT" )== 0 ||
934
933
pg_strcasecmp (prev_wd ,"ABORT" )== 0 )
935
934
{
936
935
static const char * const list_TRANS []=
937
936
{"WORK" ,"TRANSACTION" ,NULL };
938
937
939
938
COMPLETE_WITH_LIST (list_TRANS );
939
+ }
940
+ /* COMMIT */
941
+ else if (pg_strcasecmp (prev_wd ,"COMMIT" )== 0 )
942
+ {
943
+ static const char * const list_COMMIT []=
944
+ {"WORK" ,"TRANSACTION" ,"PREPARED" ,NULL };
945
+
946
+ COMPLETE_WITH_LIST (list_COMMIT );
940
947
}
941
948
/* RELEASE SAVEPOINT */
942
949
else if (pg_strcasecmp (prev_wd ,"RELEASE" )== 0 )
@@ -945,7 +952,7 @@ psql_completion(char *text, int start, int end)
945
952
else if (pg_strcasecmp (prev_wd ,"ROLLBACK" )== 0 )
946
953
{
947
954
static const char * const list_TRANS []=
948
- {"WORK" ,"TRANSACTION" ,"TO SAVEPOINT" ,NULL };
955
+ {"WORK" ,"TRANSACTION" ,"TO SAVEPOINT" ,"PREPARED" , NULL };
949
956
950
957
COMPLETE_WITH_LIST (list_TRANS );
951
958
}