Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Jeevan Chalke <jeevan.chalke@enterprisedb.com>, sean.johnston@edgeintelligence.com, Postgres-Bugs <pgsql-bugs@postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2018-01-12T21:55:17Z
Lists: pgsql-bugs
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
> I am fine with the patch. It introduces a lot of expected output diff,
> since we always deparse GROUP BY clause in positional notation. That's
> fine. There is no point in adding extra logic to  use positional
> notation only when there are duplicate entries in the GROUP BY clause.

Yeah, agreed, particularly since that behavior has only been there since
10.0 anyway.  Pushed with a few cosmetic adjustments (mostly, improving
shaky English in the comments in foreign_grouping_ok()).

			regards, tom lane


Commits

  1. Fix postgres_fdw to cope with duplicate GROUP BY entries.

  2. postgres_fdw: Push down aggregates to remote servers.