Re: pg_ugprade test failure on data set with column with default value with type bit/varbit

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul Guo <paulguo@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Richard Guo <guofenglinux@gmail.com>
Date: 2018-09-11T20:37:10Z
Lists: pgsql-hackers
Paul Guo <paulguo@gmail.com> writes:
> [ 0001-Fix-pg_upgrade-test-failure-caused-by-the-DDL-below.v2.patch ]

Actually, there's an even easier way to fix this, which is to discard
the special case for BITOID/VARBITOID altogether, and let the "default"
case handle it.  Fixing things by removing code is always great when
possible.

Also, it's fairly customary to add a test case that actually exhibits
the behavior you want to fix, so I added a regression test table
that has some bit/varbit columns with defaults.  I confirmed that that
makes the pg_upgrade test fail without this ruleutils change.

Pushed with those changes.

			regards, tom lane


Commits

  1. Remove ruleutils.c's special case for BIT [VARYING] literals.

  2. Make pg_dump output more portable and more pleasing to look at.