Subject Role issues
Author randallsell
Hi, I've created this simple stored procedure to check that the role
is what I think it is:

CREATE PROCEDURE SP_CURRENT_ROLE returns (
RESULT VarChar(31))
AS
BEGIN
/* Procedure body */
RESULT = CURRENT_ROLE;
SUSPEND;
END

Sadly, this always returns "NONE" which contradicts Helen's Bible of
Firebird which says if the role is undefined, it should be an empty
string. In this case though I've created 2 roles and am running this
script logged in with one of them. But no matter what role I use, even
if I use a role that I know is undefined ("bogusRole") my stored
procedure always returns NONE.

If I change my proc as:
RESULT = CURRENT_USER;

I get SYSDBA as expected.

Can anyone shed some light on how one logs in using a role correctly?
I have tried this from multiple client tools, Delphi, EMS,
DataWorkbench - all have the same issue so I assume it is not a client
problem, but something I'm doing wrong in defining my roles perhaps?

regards,
-randall sell