Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeevan Chalke <jeevan.chalke@enterprisedb.com>,
sean.johnston@edgeintelligence.com, Postgres-Bugs <pgsql-bugs@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>
Date: 2017-11-17T12:09:32Z
Lists: pgsql-bugs
On Sat, Nov 11, 2017 at 12:14 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > As you say, we can probably get away without that as long as we don't push > mutable grouping expressions ... but just because we think a grouping > expression is immutable at our end doesn't necessarily mean that it is at > the far end. Well, I thought of that case but then we may have problems without GROUP BY. use_physical_tlist() doesn't list ForeignScan as an exception. deparseTargetList() constructs the tlist based on attrs_used, which doesn't know if the same column was repeated in the SELECT clause. build_tlist_to_deparse() flattens the tlist to be deparsed. I think the assumption is that the user won't use immutable expression as a column. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
Commits
-
Fix postgres_fdw to cope with duplicate GROUP BY entries.
- e9f2703ab7b2 11.0 landed
- 67854bc59a8b 10.2 landed
-
postgres_fdw: Push down aggregates to remote servers.
- 7012b132d07c 10.0 cited