From ecf7a2ea387a409f6152c05f60e5765c7436b8df Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Thu, 19 Jan 2012 16:04:34 -0500
Subject: [PATCH] Add pg_upgrade C comment about why we check all relkinds for
 regtypes.

---
 contrib/pg_upgrade/check.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
index 8594d2617b2..891eb9a9f0d 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, "
-- 
GitLab