Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSoeW-0001uk-VI for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Oct 2020 21:49:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kSoeV-00015z-Py for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Oct 2020 21:49:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSoeV-00015s-K7 for pgsql-bugs@lists.postgresql.org; Wed, 14 Oct 2020 21:49:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSoeT-0001jO-JV for pgsql-bugs@lists.postgresql.org; Wed, 14 Oct 2020 21:49:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09ELnYEF3634946; Wed, 14 Oct 2020 17:49:34 -0400 From: Tom Lane To: rad@killian.email cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut Subject: Re: BUG #16671: "generated always as" is ignored when updating table through view In-reply-to: <16671-2fa55851859fb166@postgresql.org> References: <16671-2fa55851859fb166@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 14 Oct 2020 20:30:55 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3634944.1602712174.1@sss.pgh.pa.us> Date: Wed, 14 Oct 2020 17:49:34 -0400 Message-ID: <3634945.1602712174@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > [ updating via a view fails to recalculate GENERATED columns ] Yeah, that's surely a bug. In fact, it's a regression, because the test case works as-expected in v12. Not sure where we broke it. > I could be ignorant of some limitations that views have, but I have neither > looked for them nor seen them in the documentation. I just assumed in good > faith that updating rows through a view would be safe in simple cases. Is > this a dangerous assumption? Assuming that a dot-zero release is bug-free can be dangerous :-( regards, tom lane