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

Sam Tunnicliffe commented on CASSANDRA-8850:
--------------------------------------------

Having had some time to think about this some more, I'm of the opinion that we 
should leave role names as they are. That is, we should allow identifiers with 
the option to quote for case-sensitivity or when special characters are used. 

* As Sylvain points out, in every other {{CREATE X}} statement, {{X}} is an 
identifier so that would be internally consistent.
* I'm not convinced that user expectations are to require quoting. In the first 
instance, there's the expectations of existing users who will be used to using 
identifiers (plus this is of course what is already documented)
* Also, I think you may be mistaken about the behaviour of other systems. 
  ** Postgres by default behaves as CQL does currently 
^\[[1|http://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS]\]^
  ** Mysql handles case-sensitivity differently to CQL (case is preserved even 
for unquoted identifiers), but it requires quoting only in the presence of 
non-ascii characters 
^\[[2|http://dev.mysql.com/doc/refman/5.7/en/account-names.html]\]^
  ** Oracle too supports both quoted and unquoted identifiers, with unquoted (& 
case insensitive) being the recommended default 
^\[[3|http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_8003.htm#i2103003]\]^
 
^\[[4|http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements008.htm#SQLRF51129]\]^
* The security issue (if I've understood it correctly - that names may be used 
mistakenly in authorization statements due to casing errors), is valid but 
seems relatively minor and also common to the other DBs mentioned.

Given these points, it doesn't seem to me to be worth making invasive changes 
to the CQL grammar so my vote would be to only consider the first commit 
([0f0ec5a|https://github.com/beobal/cassandra/commit/0f0ec5a706d73f3c018a6dae1051fdf4f21ccbf6])
 in the branch I linked above for review and to disregard 
[001e41e|https://github.com/beobal/cassandra/commit/001e41eb6e088f3ed112f8b54540f2bf51400b1b].

> clean up options syntax for create/alter role 
> ----------------------------------------------
>
>                 Key: CASSANDRA-8850
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8850
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sam Tunnicliffe
>            Assignee: Sam Tunnicliffe
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: 8850-v2.txt, 8850.txt
>
>
> {{CREATE/ALTER ROLE}} syntax would be improved by using {{WITH}} and {{AND}} 
> in a way more consistent with other statements.
> e.g. {{CREATE ROLE foo WITH LOGIN AND SUPERUSER AND PASSWORD 'password'}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to