"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > What ideas?
Basically I think what we should do is extend SQL to support things like UPDATE (subquery) SET ... DELETE FROM (subquery) WHERE ... Ie, do the update-able view magic in the planner and executor rather than in the rewriter. Then the rewriter just has the same work to do that it does for SELECTs, namely substitute the view in the right place in the query. We don't have the rewriter try to reverse-engineer SELECTS and flatten the view into the outer query, it shouldn't be trying to do that for UPDATEs and DELETEs either. Oracle does actually support syntax like this, even for joins, and it's awfully convenient for UPDATE where it handles the same kind of cases we use our UPDATE ... FROM syntax. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
