pgsql: Fix FOR PORTION OF with non-updatable view columns
Fix FOR PORTION OF with non-updatable view columns
Both UPDATE and DELETE were failing to test that the application-time
column was updatable. The column is not part of
perminfo->updatedCols, because it should not be checked for
permissions. And it needs to be checked in the DELETE case as well,
since we might insert leftovers with a value for that column.
Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Co-authored-by: jian he <jian.universality@gmail.com>
Discussion: /messages/by-id/CACJufxFRqg8=gbZ-Q6ZS_UQ+YdwfZpk+9rf7jgWrk8m4RMUm=A@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7ca8c9429675b34600e679525da6b5280c1cafa5
Modified Files
--------------
src/backend/rewrite/rewriteHandler.c | 47 +++++++++++++++++++++++++++
src/test/regress/expected/updatable_views.out | 14 ++++++++
src/test/regress/sql/updatable_views.sql | 11 +++++++
3 files changed, 72 insertions(+)