Re: pg_get_viewdef() produces non-round-trippable SQL for views with USING join on mismatched integer types

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Swirl Smog Dowry <swirl-smog-dowry@duck.com>, pgsql-bugs@lists.postgresql.org
Date: 2026-03-02T05:53:55Z
Lists: pgsql-bugs
On Sat, Feb 28, 2026 at 3:08 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So I went ahead and pushed this, using your test case.

Thank you for handling this, Tom.

- Richard



Commits

  1. Don't flatten join alias Vars that are stored within a GROUP RTE.

  2. Introduce an RTE for the grouping step