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 1gZXto-0000w0-9r for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Dec 2018 09:12:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZXtm-0002T2-L6 for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Dec 2018 09:12:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZXtm-0002Sv-BL for pgsql-bugs@lists.postgresql.org; Wed, 19 Dec 2018 09:12:14 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZXtj-00068s-JT for pgsql-bugs@lists.postgresql.org; Wed, 19 Dec 2018 09:12:13 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id wBJ9C8Ab031448; Wed, 19 Dec 2018 18:12:08 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 360BFEA81AE; Wed, 19 Dec 2018 18:12:08 +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 2A974EA81A8; Wed, 19 Dec 2018 18:12:08 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.75]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 21AC54005E1; Wed, 19 Dec 2018 18:12:08 +0900 (JST) Message-ID: <5C1A0B6C.1040502@lab.ntt.co.jp> Date: Wed, 19 Dec 2018 18:12:12 +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: BUG #15552: Unexpected error in COPY to a foreign table in a transaction References: <15552-c64aa14c5c22f63c@postgresql.org> <8e82d10d-cc16-eed4-7634-3654f59d8053@lab.ntt.co.jp> <30718b48-8020-329a-c6f0-74e1222e5283@lab.ntt.co.jp> <5C18ECBB.2000507@lab.ntt.co.jp> <3539e73a-313a-5406-27c7-850affb47921@lab.ntt.co.jp> <20181219023814.GA6577@paquier.xyz> <6daa6d4a-d4a9-bd2c-0b84-c4e31d2b9844@lab.ntt.co.jp> <5C19F7FF.9060904@lab.ntt.co.jp> <20181219083422.GA680@paquier.xyz> In-Reply-To: <20181219083422.GA680@paquier.xyz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Michael Paquier Cc: Amit Langote , Luis Carril , "pgsql-bugs@lists.postgresql.org" , PG Bug reporting form , Michael Paquier X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk (2018/12/19 17:34), Michael Paquier wrote: > On Wed, Dec 19, 2018 at 04:49:19PM +0900, Etsuro Fujita wrote: >> BTW I noticed that this error occurs not only for foreign tables but for >> views with INSTEAD OF INSERT triggers. Here is an example on HEAD: >> >> To fix this I think we would also need the same treatment for the view case. > > Yes, this means an extra relkind check for views. I think so too. I think it might be better to add regression tests for the view case as well, though. > Would you like to > update the patch yourself? I'd be happy if you worked on that. Best regards, Etsuro Fujita