pgsql: Fix handling of auto-updatable views on inherited tables. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix handling of auto-updatable views on inherited tables.
Date
Msg-id E1UuPte-0008Ci-5B@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix handling of auto-updatable views on inherited tables.

An INSERT into such a view should work just like an INSERT into its base
table, ie the insertion should go directly into that table ... not be
duplicated into each child table, as was happening before, per bug #8275
from Rushabh Lathia.  On the other hand, the current behavior for
UPDATE/DELETE seems reasonable: the update/delete traverses the child
tables, or not, depending on whether the view specifies ONLY or not.
Add some regression tests covering this area.

Dean Rasheed

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/654b702a1c01fa047a363a887f957886503ea67c

Modified Files
--------------
src/backend/rewrite/rewriteHandler.c          |    7 ++
src/test/regress/expected/updatable_views.out |  100 +++++++++++++++++++++++++
src/test/regress/sql/updatable_views.sql      |   32 ++++++++
3 files changed, 139 insertions(+)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Unbreak postmaster restart-after-crash sequence
Next
From: Tom Lane
Date:
Subject: pgsql: Fix handling of auto-updatable views on inherited tables.