pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers
2+ messages / 1 participants
[nested] [flat]

* pgsql: Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers
@ 2026-08-14 11:54 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2026-08-14 11:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers

DELETE FOR PORTION OF inserts temporal leftovers through ExecInsert(),
but the rewriter only attached view WCOs for INSERT/UPDATE.  Leftover
rows could therefore silently escape a WITH CHECK OPTION view, while
the equivalent UPDATE correctly raised an error.

This commit fixes it by attaching the WCOs for FOR PORTION OF deletes
too.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Paul A Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: solai v <solai.cdac@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAN4CZFOuTyhGspG0Nyits8PiK2keoNXkLj-u3APzc66aRcWY9A%40mai...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9924e2d900bf833c1d732d4bf877f51269b03157

Modified Files
--------------
doc/src/sgml/ref/create_view.sgml             | 20 ++++++----
src/backend/rewrite/rewriteHandler.c          |  8 +++-
src/test/regress/expected/updatable_views.out | 56 +++++++++++++++++++++++++++
src/test/regress/sql/updatable_views.sql      | 29 ++++++++++++++
4 files changed, 104 insertions(+), 9 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers
@ 2026-08-14 11:54 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2026-08-14 11:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers

DELETE FOR PORTION OF inserts temporal leftovers through ExecInsert(),
but the rewriter only attached view WCOs for INSERT/UPDATE.  Leftover
rows could therefore silently escape a WITH CHECK OPTION view, while
the equivalent UPDATE correctly raised an error.

This commit fixes it by attaching the WCOs for FOR PORTION OF deletes
too.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Paul A Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: solai v <solai.cdac@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAN4CZFOuTyhGspG0Nyits8PiK2keoNXkLj-u3APzc66aRcWY9A%40mai...

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f3a116a26ff0c0be83b990d3d9b3fd9e425bb197

Modified Files
--------------
doc/src/sgml/ref/create_view.sgml             | 20 ++++++----
src/backend/rewrite/rewriteHandler.c          |  8 +++-
src/test/regress/expected/updatable_views.out | 56 +++++++++++++++++++++++++++
src/test/regress/sql/updatable_views.sql      | 29 ++++++++++++++
4 files changed, 104 insertions(+), 9 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-08-14 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-14 11:54 pgsql: Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers Peter Eisentraut <peter@eisentraut.org>
2026-08-14 11:54 pgsql: Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers Peter Eisentraut <peter@eisentraut.org>

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