Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJsxJ-0001W6-K1 for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Apr 2019 04:59:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJsxG-0005e9-PI for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Apr 2019 04:59:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJsxG-0005NW-DW; Fri, 26 Apr 2019 04:59:22 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJsx8-0004Js-Vo; Fri, 26 Apr 2019 04:59:21 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x3Q4whxi029631; Fri, 26 Apr 2019 13:58:43 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 30343EA7676; Fri, 26 Apr 2019 13:58:43 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 20E35EA7669; Fri, 26 Apr 2019 13:58:43 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.75]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 10CCE400682; Fri, 26 Apr 2019 13:58:43 +0900 (JST) Message-ID: <5CC28FE7.90607@lab.ntt.co.jp> Date: Fri, 26 Apr 2019 13:58:15 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 Subject: Re: pgsql: Allow insert and update tuple routing and COPY for foreign table References: <5CBDB770.2060602@lab.ntt.co.jp> <5CC04E72.90405@lab.ntt.co.jp> <5CC1B358.5090205@lab.ntt.co.jp> <1cc7b8be-d201-8bad-5d98-350faccf095c@lab.ntt.co.jp> In-Reply-To: <1cc7b8be-d201-8bad-5d98-350faccf095c@lab.ntt.co.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Amit Langote Cc: Laurenz Albe , Robert Haas , pgsql-committers@lists.postgresql.org, pgsql-hackers@lists.postgresql.org X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit-san, (2019/04/26 13:20), Amit Langote wrote: > On 2019/04/25 22:17, Etsuro Fujita wrote: >> (2019/04/24 22:04), Laurenz Albe wrote: >>> Before PostgreSQL v11, a foreign data wrapper could be certain that >>> BeginForeignModify is always called before ExecForeignInsert. >>> This is no longer true. >> >> OK, how about something like the attached? I reworded this a bit, though. > > Thanks for the patch. > > + Note that this function is also called when inserting routed tuples into > + a foreign-table partition or executingCOPY FROM on > + a foreign table, in which case it is called in a different way than it > + is in theINSERT case. > > Maybe minor, but should the last part of this sentence read as: > > ...in which case it is called in a different way than it is in the case > INSERT is operating directly on the foreign table. > > ? Yeah, but I think it would be OK to just say "the INSERT case" because this note is added to the docs for ExecForeignInsert(), which allows the FDW to directly insert into foreign tables as you know, so users will read "the INSERT case" as "the case INSERT is operating directly on the foreign table". Thanks for the comment! Best regards, Etsuro Fujita