WL#3821: TRUNCATE for VIEWs

Affects: Server-7.1 — Status: Un-Assigned — Priority: Medium

TRUNCATE is an Oracle compatiblity feature.
It is defined as a DDL, an atomic DROP+CREATE (but without removing
dependencies, e.g. triggers).
As such it
- is not part of the transaction, cannot be rolled back
- requires DROP privilege
- does not fire ON DELETE triggers
- does not work for views (DROP+CREATE for a view makes no sense)

Note that TRUNCATE is *not* a DELETE, otherwise it'd be part of the transaction,
could've been rolled back, would require DELETE privilege, and would fire ON
DELETE triggers.

Anyway, Monty thinks it may make sense to support TRUNCATE for views in certain
cases. "For views without a where clause and only uses one table it would be
nice to have truncate". But to solve the question of privileges we'll need a
dedicated TRUNCATE privilege, says Monty.

So, the subject of this WL is:
- add a TRUNCATE privilege
- support TRUNCATE for "table-wrapper" views, that is views that only use one
table and don't have a WHERE clause (and are updatable)

You must be logged in to tag this worklog

No Comments yet

Votes

  • Rated 2.00 out of 5
Rated 2.00 out of 5 with 1 votes cast.
You must be logged in to vote.

Watches

0 members are watching this worklog
You must be logged in to track this worklog.

Provide Feedback

Please note:
HTML will be purified, but we allow for a number of HTML tags so that you have the flexibility to decorate your comment text to some extent. The comments allow the following HTML tags:

strong, b, em, blockquote, a, code, pre

To put code into your comment, simply encapsulate your code with
[code language="XXX"][/code], where XXX is any common language, for instance "PHP", "SQL", "C", etc.



You must be logged in to comment