pgsql: Test GROUP BY matching of join columns that are type-coerced by

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Test GROUP BY matching of join columns that are type-coerced by
Date: 2020-01-02 00:31:52
Message-ID: E1imoP2-00068i-8z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/823e739d4a7257cf0ca58fc6eff3c4cec308fccf

Modified Files
--------------
src/test/regress/expected/aggregates.out | 26 ++++++++++++++++++++++++++
src/test/regress/sql/aggregates.sql | 15 +++++++++++++++
2 files changed, 41 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2020-01-02 01:30:23 pgsql: Revise BTP_HAS_GARBAGE nbtree VACUUM comments.
Previous Message Peter Geoghegan 2020-01-01 19:33:16 pgsql: Update btree_xlog_delete() comments.