Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW
Date
Msg-id 10660.1510093781@sss.pgh.pa.us
Whole thread Raw
Responses Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
List pgsql-bugs
sean.johnston@edgeintelligence.com writes:
> select col1, col1 from loop_tbl group by 1, 2;
> psql:t.sql:7: ERROR:  targetlist item has multiple sortgroupref labels

This is the fault of commit 7012b132d ("Push down aggregates to remote
servers"), which imagined that postgres_fdw can use
apply_pathtarget_labeling_to_tlist() for situations well beyond that
function's limited abilities.  I kinda suspect that foreign_grouping_ok()
has got more bugs than this with complicated sortgroupref situations, too;
its willingness to scribble on the sortgrouprefs doesn't look like a great
idea to me.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug
Next
From: Michael Paquier
Date:
Subject: Re: [BUGS] Fails to work on live images due to fsync() onpg_commit_ts before doing any write there