Test GROUP BY matching of join columns that are type-coerced by USING.

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

Commit: 823e739d4a7257cf0ca58fc6eff3c4cec308fccf
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-01-02T00:31:41Z
Releases: 13.0
Test GROUP BY matching of join columns that are type-coerced by USING.

If we have, say, an int column that is left-joined to a bigint column
with USING, the merged column is the int column promoted to bigint.
GROUP BY's tests for whether grouping on the merged column allows a
reference to the underlying column, or vice versa, should know about
that relationship --- and they do.  But I nearly broke this case with
an ill-advised optimization, so the lack of any test coverage for it
seems like a bad idea.

Files