Re: pgsql: Refactor attribute mappings used in logical tuple conversion

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Refactor attribute mappings used in logical tuple conversion
Date: 2019-12-19 01:38:08
Message-ID: 20191219013808.GB4202@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Dec 19, 2019 at 10:23:32AM +0900, Amit Langote wrote:
> On Wed, Dec 18, 2019 at 11:37 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> TBH, though, I wonder if this doesn't indicate you've put this
>> function in the wrong header to begin with. Why does it belong
>> in rewriteManip?

Thanks for the fix! I was going to address that this morning to
notice that you already committed a fix.

> Assuming you are talking about map_variable_attnos(), it's always been
> in rewriteManip.c / rewriteManip.h since it was added by 541ffa65c32.
>
> While reviewing this patch, I had the idea of moving it to the new
> header attmap.h, but thought it might be a good idea to keep attmap.c
> limited to just building the maps and not move into it other functions
> that do something useful with those maps, like translating expression
> trees, converting tuples, etc.

I'd rather keep attmap.c focused on its basic work which is to make
and build the attribute maps. For map_variable_attnos() & co, I am
wondering if we should not split things even further. This code is
located now in the rewriter, but we make use of it in the executor for
partitioning.
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-12-19 07:43:46 pgsql: Add support for MSYS2
Previous Message Amit Langote 2019-12-19 01:23:32 Re: pgsql: Refactor attribute mappings used in logical tuple conversion