diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
index 8594d2617b286976424732b283661dc2584b8f8d..891eb9a9f0dd4ddcc30f2c22d85ada7a71712c5e 100644
--- a/contrib/pg_upgrade/check.c
+++ b/contrib/pg_upgrade/check.c
@@ -644,6 +644,11 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
 		DbInfo	   *active_db = &cluster->dbarr.dbs[dbnum];
 		PGconn	   *conn = connectToServer(cluster, active_db->db_name);
 
+		/*
+		 *	While several relkinds don't store any data, e.g. views, they
+		 *	can be used to define data types of other columns, so we
+		 *	check all relkinds.
+		 */
 		res = executeQueryOrDie(conn,
 								"SELECT n.nspname, c.relname, a.attname "
 								"FROM	pg_catalog.pg_class c, "