Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UuPwM-0004AM-Ss for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jul 2013 16:29:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UuPwM-00056G-D7 for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jul 2013 16:29:58 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UuPwL-000569-PP for pgsql-bugs@postgresql.org; Wed, 03 Jul 2013 16:29:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UuPwJ-0006FM-Uj for pgsql-bugs@postgresql.org; Wed, 03 Jul 2013 16:29:57 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r63GTs76011684; Wed, 3 Jul 2013 12:29:54 -0400 (EDT) From: Tom Lane To: Dean Rasheed cc: Rushabh Lathia , pgsql-bugs@postgresql.org Subject: Re: BUG #8275: Updateable View based on inheritance (partition) throws Error on INSERT Statement In-reply-to: References: Comments: In-reply-to Dean Rasheed message dated "Tue, 02 Jul 2013 11:42:58 +0100" Date: Wed, 03 Jul 2013 12:29:54 -0400 Message-ID: <11683.1372868994@sss.pgh.pa.us> X-Pg-Spam-Score: 0.8 (/) 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 Dean Rasheed writes: > On 2 July 2013 09:30, Dean Rasheed wrote: >> I think the rewritten query should only use inheritance if inheritance >> was requested in the original query, *and* if inheritance was enabled >> in the view's query, per attached patch against HEAD. > On second thoughts, I think this should only apply to INSERT. > UPDATE and DELETE should continue work the same as SELECT, respecting > the inheritance flag from the view query regardless of the inheritance > flag in the outer query. [ thinks for a bit... ] Yeah, I agree. > Attached is an updated patch for HEAD, with regression tests. This > should also be applied to the 9.3beta branch. Applied with minor adjustments --- mainly, I took out the inFromCl twiddling, which AFAICS is neither necessary (nothing downstream of this looks at inFromCl) nor clearly correct. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs