[ 
https://issues.apache.org/jira/browse/CASSANDRA-20761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18005192#comment-18005192
 ] 

Stefan Miklosovic commented on CASSANDRA-20761:
-----------------------------------------------

I can indeed create a separate ticket for that.

Also, if we go to do TRUNCATE KEYSPACE ks, we might also require DROP 
permission on that keyspace instead of DROP permission on each individual 
table. 

> Support TRUNCATE <keyspace> to truncate all tables in it
> --------------------------------------------------------
>
>                 Key: CASSANDRA-20761
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20761
>             Project: Apache Cassandra
>          Issue Type: New Feature
>          Components: CQL/Semantics
>            Reporter: Stefan Miklosovic
>            Priority: Normal
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If I want to truncate whole keyspace by one command, now I can not do that as 
> I need to enumerate all tables from that keyspace and truncate one by one.
> It might be probably possible to do 
> {code}
> TRUNCATE keyspace_name
> {code}
> which would internally iterate over all tables and truncate them all so user 
> is saved from doing that.
> However, I think that the usage of 
> {code}
> TRUNCATE keyspace_name
> {code}
> is a little bit risky because, for example, users might think that they are 
> using keyspace already by USE statement so "keyspace_name" is actually a 
> table name. If there is a keyspace of such name then it would truncate all 
> tables in it.
> It would be probably better to have a new statement like
> {code}
> TRUNCATE KEYSPACE abc;
> {code}
> That way, it is pretty obvious what we want to truncate. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to