From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: rad@killian.email
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16671: "generated always as" is ignored when updating table through view
Date: Wed, 14 Oct 2020 18:45:53 -0400
Message-ID: <3637295.1602715553@sss.pgh.pa.us> (raw)
In-Reply-To: <3634945.1602712174@sss.pgh.pa.us>
References: <16671-2fa55851859fb166@postgresql.org>
<3634945.1602712174@sss.pgh.pa.us>
I wrote:
> PG Bug reporting form <noreply@postgresql.org> 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.
git bisect blames
c6679e4fca21d253ced84c51ac1a31c1b2aec72f is the first bad commit
commit c6679e4fca21d253ced84c51ac1a31c1b2aec72f
Author: Peter Eisentraut <peter@eisentraut.org>
Date: Mon Feb 17 15:19:58 2020 +0100
Optimize update of tables with generated columns
When updating a table row with generated columns, only recompute those
generated columns whose base columns have changed in this update and
keep the rest unchanged. This can result in a significant performance
benefit. The required information was already kept in
RangeTblEntry.extraUpdatedCols; we just have to make use of it.
Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/b05e781a-fa16-6b52-6738-761181204567@2ndquadrant.com
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, rad@killian.email, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16671: "generated always as" is ignored when updating table through view
In-Reply-To: <3637295.1602715553@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox