Updating view Free sexy chat no joining
Knowing all that, we can simply apply view rules in absolutely the same way to any command. And this is still the situation when the original query is already a join over views.
The planner has to decide which is the best path to execute the query, and the more information the planner has, the better this decision can be.
Therefore, if a view has triggers for the view, and the rewriter cannot automatically rewrite the query as an update on the underlying base relation, an error will be thrown because the executor cannot update a view as such.
The problem that now arises is how to identify the rows to be updated in the view.
These are the command type and the result relation.
In fact, the command type is not needed by view rules, but the result relation may affect the way in which the query rewriter works, because special care needs to be taken if the result relation is a view.
Base tables might in turn be actual tables or might be views themselves.
All operations performed on a view actually affect the base table of the view.
The examples for this chapter are two join views that do some calculations and some more views using them in turn.