Subject Privileges for generators in Firebird 3
Author Aldo Caruso
Hello,

    I'm migrating from Firebird 2 to Firebird 3

    When setting a generator, I get the following error:

SET GENERATOR GEN_AGENDA_NRO to 287390;

unsuccessful metadata update
SET GENERATOR GEN_AGENDA_NRO failed
no permission for ALTER access to GENERATOR GEN_AGENDA_NRO

The same happens if I use the new syntax:

ALTER SEQUENCE GEN_AGENDA_NRO RESTART WITH 287390;

Reading documentation I found that there is a new SQL command for
granting privileges to metadata objects like sequences

GRANT ALTER ANY <object-type>
TO [USER | ROLE] <user-name> | <role-name> [WITH GRANT OPTION];

I'm a bit confused about how to specify the sequence

Should I use

GRANT ALTER ANY SEQUENCE TO ROLE <role-name>

or

GRANT ALTER SEQUENCE TO ROLE <role_name>

Why isn't a way to define a specific sequence ? i.e.

GRANT ALTER SEQUENCE <sequence-name> TO ROLE <role-name>


Thanks in advance for any answer.

Aldo Caruso