05.02.2015 14:36, Geoff Worboys wrote:
> Hi,
>
> Firebird v2.5.3
>
> I've been studying the source trying to understand the reasons
> behind a particular aspect of EXECUTE STATEMENT with ON EXTERNAL.
>
> Specifically, why are USER PASSWORD and ROLE tied together here?

   Why do you think so ? See below:

execute block returns (qry varchar(32), tx int, rl varchar(32))
as
declare s varchar(256);
begin
   s = 'select current_transaction, current_role from rdb$database';

   qry = 'local';
   tx = current_transaction; rl = current_role;
   suspend;

   qry = 'ES1';
   execute statement :s
     into :tx, :rl;
   suspend;

   qry = 'ES2';
   execute statement :s
     as user 'vlad'
     into :tx, :rl;
   suspend;

   qry = 'ES3';
   execute statement :s
     role 'role1'
     into :tx, :rl;
   suspend;
end^


QRY                                        TX RL
================================ ============ ================================
local                                     187 NONE
ES1                                       187 NONE
ES2                                       189 NONE
ES3                                       190 ROLE1


Hope this helps,
Vlad

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to