Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1yqy-0007pL-HM for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jul 2013 13:11:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V1yqy-0003sc-02 for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jul 2013 13:11:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1yqw-0003r4-SP for pgsql-bugs@postgresql.org; Wed, 24 Jul 2013 13:11:38 +0000 Received: from keepquiet.net ([78.46.162.42]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1yqs-0002eR-PG for pgsql-bugs@postgresql.org; Wed, 24 Jul 2013 13:11:38 +0000 Received: from [10.130.11.119] (cm-84.210.76.250.getinternet.no [84.210.76.250]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: terje@elde.net) by keepquiet.net (Postfix) with ESMTPSA id 0A0952E42D for ; Wed, 24 Jul 2013 15:11:32 +0200 (CEST) From: Terje Elde Content-Type: multipart/alternative; boundary="Apple-Mail=_0833F9C9-C1CA-405A-AC96-FB846FB72EE1" Message-Id: <1297A7EB-DA4B-44A0-A768-84A094EFF230@elde.net> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Single row INSERT on updatable VIEW on top of partitioned table is run against each inheriting table, giving multiple rows from single insert. Date: Wed, 24 Jul 2013 15:11:31 +0200 References: To: "pgsql-bugs@postgresql.org" In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --Apple-Mail=_0833F9C9-C1CA-405A-AC96-FB846FB72EE1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jul 24, 2013, at 2:37 PM, Terje Elde wrote: > Short summary: > If I run a single INSERT against an updateable VIEW on top of a = partitioned table, it's run against all the tables/partitions. I'd = expect that with UPDATE and DELETE, but not with INSERT. Result is = multiple rows for a single INSERT, one for each table. Sorry, while I did scan the last month and the open issues-list before = sending, I missed that this had already been identified, patch = submitted, and applied: = http://www.postgresql.org/message-id/CAEZATCW4EUi-BqjzYyow0nt84jhOwSDxzbht= bFoRrvUi59NCnQ@mail.gmail.com http://www.postgresql.org/message-id/11683.1372868994@sss.pgh.pa.us Everything behaves as expected with the patch. Terje --Apple-Mail=_0833F9C9-C1CA-405A-AC96-FB846FB72EE1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 terje@elde.net> = wrote:
Short = summary:
If I run a single INSERT against an = updateable VIEW on top of a partitioned table, it's run against all the = tables/partitions.  I'd expect that with UPDATE and DELETE, but not = with INSERT.  Result is multiple rows for a single INSERT, one for = each table.

Sorry, while I did scan the = last month and the open issues-list before sending, I missed that this = had already been identified, patch submitted, and = applied: