Subject stored procedure for system tables
Author sergei_fetiskin
Hi, all.

I have a procedure that works with system table

create procedure ZLS$DESCRIBE_TABLE (
TABLE_NAME varchar(100),
DESCRIPTION varchar(1000))
as
begin
if (not exists (select * from RDB$RELATIONS where RDB$RELATION_NAME
= :TABLE_NAME))
then exception ZLS$INVALID_DESCRIPTION :TABLE_NAME;
update RDB$RELATIONS
set RDB$DESCRIPTION = :DESCRIPTION
where RDB$RELATION_NAME = :TABLE_NAME;
end

There is user that have rights on this procedure and, of course, the
procedure have rights on
the table RDB$RELATIONS. Next I try to execute it

execute procedure ZLS$DESCRIBE_TABLE ('ZLS$OBJECT_TYPES', 'NEW DSCR')
;

and received message that user have "no permission for protect access
to TABLE ZLS$OBJECT_TYPES".
I check this with non system tables and everything works fine. Where
is my error?
--
Best regards,
Sergei Fetiskin