Re: [PATCH] ruleutils: Fix subqueries with shadowed aliases

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Philip Dubé <Philip.Dub@microsoft.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2019-06-12T23:46:13Z
Lists: pgsql-hackers
=?iso-8859-1?Q?Philip_Dub=E9?= <Philip.Dub@microsoft.com> writes:
> Discovered while looking into issue here: https://github.com/citusdata/citus/pull/2733
> For completeness I'll quote the example code to demonstrate the issue:
> ...
> Where the 2nd join_alias should be renamed to join_alias_1

Good catch!  The proposed test case is less good though, because
it doesn't actually exercise the bug, ie the test case passes
with or without the code change.  (You also stuck it into the
middle of a bunch of not-very-related test cases.)  I adapted
your example into a better test case and pushed it.  Thanks
for the report and fix.

			regards, tom lane



Commits

  1. Fix incorrect printing of queries with duplicated join names.