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 1gx2gI-0004sT-Gj for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Feb 2019 04:43:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gx2gG-0006KQ-SU for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Feb 2019 04:43:24 +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 1gx2gG-0006KJ-M3 for pgsql-bugs@lists.postgresql.org; Fri, 22 Feb 2019 04:43:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gx2gD-0003M5-MT for pgsql-bugs@postgresql.org; Fri, 22 Feb 2019 04:43:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x1M4hDjS003382; Thu, 21 Feb 2019 23:43:13 -0500 From: Tom Lane To: Amit Langote cc: Petr Fedorov , pgsql-bugs@postgresql.org Subject: Re: 'update returning *' returns 0 columns instead of empty row with 2 columns when (i) no rows updated and (ii) when applied to a partitioned table with sub-partition In-reply-to: <6a08a294-6a16-e384-db25-8f4d3cc026d1@lab.ntt.co.jp> References: <5da6f0f0-1364-1876-6978-907678f89a3e@phystech.edu> <907bb879-872e-8395-80af-1b98efc10b06@lab.ntt.co.jp> <13543.1550787490@sss.pgh.pa.us> <6a08a294-6a16-e384-db25-8f4d3cc026d1@lab.ntt.co.jp> Comments: In-reply-to Amit Langote message dated "Fri, 22 Feb 2019 11:16:40 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3380.1550810593.1@sss.pgh.pa.us> Date: Thu, 21 Feb 2019 23:43:13 -0500 Message-ID: <3381.1550810593@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Langote writes: > Also, I noticed regression test failure having to do with statement > triggers not firing, which makes sense, as there's no ModifyTable to > invoke them. Oh! You are right, that's a separate bug. So really we can't have this fast-path exit at all, we should produce a ModifyTable node in every case. I'm too tired to work on that anymore today, do you want to run with it? regards, tom lane