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

From Ashutosh Bapat
Subject Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW
Date
Msg-id CAFjFpRfJBZT6Pjq6xQ5jzn9gsuMXtuqn+8=BnTUG7vAdb6Litw@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-bugs by date:

Previous
From: sagadin@gmail.com
Date:
Subject: BUG #14917: process hang on create index
Next
From: Michael Paquier
Date:
Subject: Re: BUG #14917: process hang on create index