[ 
https://issues.apache.org/jira/browse/DERBY-4189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703394#action_12703394
 ] 

Dag H. Wanvik commented on DERBY-4189:
--------------------------------------

We had a long thread on DERBY-3137, so this is by design. I think this is all a 
bit fuzzy in the standard.

https://issues.apache.org/jira/browse/DERBY-3137?focusedCommentId=12634139&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12634139

SET ROLE also deviates from SET SCHEMA/CURRENT_SCHEMA in the same way. I agree 
it's unfortunate, but SET SCHEMA seem to be in violation of the standard.
CURRENT_USER/CURRENT_SCHEMA return a CNF (case normal form) value, CURRENT_ROLE 
return an identifier as you have noted.


> CURRENT_ROLE returns role name with double quotes around it
> -----------------------------------------------------------
>
>                 Key: DERBY-4189
>                 URL: https://issues.apache.org/jira/browse/DERBY-4189
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.1.1
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>
> CURRENT_ROLE returns the current role name with quotes around it. This does 
> not follow the existing pattern used by CURRENT_USER.
> Example:
> $ java -Dderby.connection.requireAuthentication=true 
> -Dderby.database.sqlAuthorization=true -Dderby.user.kah=secret -jar 
> lib/derbyrun.jar ij
> ij version 10.5
> ij> connect 'jdbc:derby:db;create=true;user=kah;password=secret';
> ij> create role myrole;
> 0 rows inserted/updated/deleted
> ij> set role myrole;
> 0 rows inserted/updated/deleted
> ij> values current_user;
> 1                                                                             
>                                                   
> --------------------------------------------------------------------------------------------------------------------------------
> KAH                                                                           
>                                                   
> 1 row selected
> ij> values current_role;
> 1                                                                             
>                                                   
> --------------------------------------------------------------------------------------------------------------------------------
> "MYROLE"                                                                      
>                                                   
> 1 row selected

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to