Re: de-deduplicate code in DML execution hooks in postgres_fdw

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: de-deduplicate code in DML execution hooks in postgres_fdw
Date: 2018-11-30 10:55:58
Message-ID: 5C01173E.2050303@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2018/11/30 2:58), Dmitry Dolgov wrote:
>> On Mon, Oct 1, 2018 at 2:55 PM Etsuro Fujita<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>
>> (2018/10/01 19:42), Michael Paquier wrote:
>>> On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote:
>>> Fujita-san, you are registered as a reviewer of this patch. Are you
>>> planning to look at it soon?
>>
>> Yeah, I'm planning to work on this immediately after fixing the issue
>> [1], because it still seems to me wise to work on it after addressing
>> that issue. (I'll post an updated version of the patch for that tomorrow.)
>
> Yep, it would be nice to have a full review here. But as far as I see the issue
> you were talking about is still in progress, right?

That's right.

> Also looks like someone
> needs to take over this rather small patch.

I changed my mind; I thought it would be better to work on that issue
before this, but Tom raised concerns about the patch I proposed for that
issue, and I think it'll take much longer time to address that, so I'd
like to get this done first.

One thing we would need to discuss more about this is the name of a new
function added by the patch. IIRC, we have three options so far [1]:

1) perform_one_foreign_dml proposed by Ashutosh
2) execute_dml_single_row proposed by Michael
3) execute_parameterized_dml_stmt proposed by me

I'll withdraw my proposal; I think #1 and #2 would describe the
functionality better than #3. My vote would go to #2 or
execute_dml_stmt_single_row, which moves the function much more closer
to execute_dml_stmt. I'd like to hear the opinions of others.

Thanks!

Best regards,
Etsuro Fujita

[1]
https://www.postgresql.org/message-id/CAFjFpRc%2BMdhD2W%3Dofc06n3NriqPCy6ztNBehXTc_g_y9%3DP5k1w%40mail.gmail.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2018-11-30 11:04:46 Re: New GUC to sample log queries
Previous Message Marius Timmer 2018-11-30 10:54:18 Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full