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 <[email protected]>
Co-authored-by: jian he <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/CACJufxFRqg8%3DgbZ-Q6ZS_UQ%2BYdwfZpk%2B9rf7jgWrk8m4RMUm%3DA%40mail.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(+)

Reply via email to