diff --git a/src/test/regress/checkresults b/src/test/regress/checkresults
new file mode 100755
index 0000000000000000000000000000000000000000..1536dc2dba1e045d3062cd4fdabd8b519c100aea
--- /dev/null
+++ b/src/test/regress/checkresults
@@ -0,0 +1,11 @@
+#!/bin/sh
+# check regression tests
+# usage:  checkresults < results.out
+
+for file in `cat "$@" | grep 'failed$' | cut -d " " -f 1`
+do
+	echo "======   $file   ======"
+	diff -w expected/$file.out results
+done
+
+