pg_upgrade: Fix dump file diff caused by default value with type bit varying in column of a relation. (#4823)
pg_upgrade: Fix dump file diff caused by default value with type bit varying in column of a relation. (#4823)

Here is the repro case:
psql -X -d regression -c "CREATE TABLE t111 ( a40 bit varying(5) DEFAULT '1');"
psql -X -d regression -c "CREATE TABLE t222 ( a40 bit varying(5) DEFAULT B'1');"

After pg_upgrade testing, we will see failure and the diff of dump sql files looks like this:

 CREATE TABLE t111 (
-    a40 bit varying(5) DEFAULT B'1'::bit varying
+    a40 bit varying(5) DEFAULT (B'1'::"bit")::bit varying
 ) DISTRIBUTED BY (a40);

No diff for the table t222. From perspective of functionality, the difference
seems to mean nothing, but it is annoying for CI.

This issue was found when testing pg_upgrade using the pg_regression database which is generated after running regression tests so we do not need to add a test case for it.

This issue exists on latest PG also. We submitted a patch to upstream and the patch is under reviewing. We'll check in GP in advance.

Co-authored-by: Richard Guo <02e4eb038063f45ff41ca30800efa28642abdbfb@pivotal.io>
Co-authored-by: Paul Guo <e78f8a884cebd97fb3b249dc32d233761d2e480a@pivotal.io>
jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,50wu/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,lisakowen/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,jmcatamney/gpdb,adam8157/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,lisakowen/gpdb,xinzweb/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,50wu/gpdb,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,jmcatamney/gpdb