Re: Push down more full joins in postgres_fdw

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Push down more full joins in postgres_fdw
Date: 2016-10-27 09:06:04
Message-ID: CAFjFpRd-GMYM2RXS8vgR_CuA5ffPBbj5DaoSjQtzDoh0FQOwkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 27, 2016 at 12:46 PM, Etsuro Fujita
<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2016/10/26 19:53, Ashutosh Bapat wrote:
>>
>> On Wed, Oct 26, 2016 at 3:35 PM, Etsuro Fujita
>> <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>
>
>>> In practice, the search cost would be negligible compared to the cost of
>>> explaining/executing the query.
>>>
>>> My concern about your proposal is: it might not be worth complicating the
>>> code to solve a problem that is actually not a problem in practice.
>
>
>> To me the current code looks complicated esp. because of the recursion
>> involved and usage of out parameters to isSubqueryExpr().
>
>
> I don't think so. isSubqueryExpr is prety small, written in less than 50
> lines, and the code looks rather simple to me.
>
>> My
>> suggestion goes inline with the current method of deparsing a Var.
>
>
> Yeah, I think your approach makes it easy to search for the alias to a given
> Var from the array you proposed. I think the complexity of your approach
> would be in extra work for building and maintaining the array while
> deparsing the query. I think that would probably need more invasive and
> much larger changes to the existing code than what I proposed.
>
> I think this issue is optional, so I'd like to propose to leave this for the
> committer's judge.
>

Fine with me.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2016-10-27 09:07:43 Re: Patch to implement pg_current_logfile() function
Previous Message Ashutosh Bapat 2016-10-27 09:05:04 Re: [RFC] Should we fix postmaster to avoid slow shutdown?