You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see this issue in the code. All built-in functions don't have declared parameter types/lengths, they accept whatever is passed. The problem is whether the argument can be converted to the expected datatype. RDB$ROLE_IN_USE expects a string of arbitrary length, I don't see any limit implied there.
There were 2 issues - first, varchar(32) in documentation, which was obviously wrong limit, Dmitry is right, built-in functions accept whatever is passed. But there was one more issue - case sensitivity. I've blindly uppercased role name what is definitely wrong - we may have roles with lower case letters, moreover, we may have SOMEROLE and SomeRole, and that will be 2 different roles.
The small problem with this function is that we can't use double quotes to mark names of case-sensitive roles - we should be able to accept strings returned by CURRENT_ROLE, values in RDB$ROLE_NAME field, and they all do not contain double quotes. Therefore the only working solution is to always enter role name case sensitive.