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

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, sean(dot)johnston(at)edgeintelligence(dot)com, Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [BUGS] BUG #14890: Error grouping by same column twice using FDW
Date: 2017-11-17 12:09:32
Message-ID: CAFjFpRfJBZT6Pjq6xQ5jzn9gsuMXtuqn+8=BnTUG7vAdb6Litw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Nov 11, 2017 at 12:14 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-11-17 13:58:07 Re: BUG #14917: process hang on create index
Previous Message sagadin 2017-11-17 11:26:00 BUG #14917: process hang on create index