diff --git a/src/pl/plpgsql/src/pl_funcs.c b/src/pl/plpgsql/src/pl_funcs.c
index d6825e46346d09d16f052fdb36f5c45472adb685..c631e89155acf204b865244c3812a44e7c831841 100644
--- a/src/pl/plpgsql/src/pl_funcs.c
+++ b/src/pl/plpgsql/src/pl_funcs.c
@@ -235,7 +235,7 @@ plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
 		case PLPGSQL_STMT_FOREACH_A:
 			return _("FOREACH over array");
 		case PLPGSQL_STMT_EXIT:
-			return "EXIT";
+			return ((PLpgSQL_stmt_exit *) stmt)->is_exit ? "EXIT" : "CONTINUE";
 		case PLPGSQL_STMT_RETURN:
 			return "RETURN";
 		case PLPGSQL_STMT_RETURN_NEXT:
@@ -255,7 +255,7 @@ plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
 		case PLPGSQL_STMT_OPEN:
 			return "OPEN";
 		case PLPGSQL_STMT_FETCH:
-			return "FETCH";
+			return ((PLpgSQL_stmt_fetch *) stmt)->is_move ? "MOVE" : "FETCH";
 		case PLPGSQL_STMT_CLOSE:
 			return "CLOSE";
 		case PLPGSQL_STMT_PERFORM: