0

I need to create a user in firebird 1.5 and give him permissions to access only some specific tables. I have managed to create the user, but apparently GRANT/REVOKE operations only work on version 2.1 or above. SO, how to do it?

UPDATE
Actually i was mistaken, GRANT and REVOKE both work fine in version 1.5.

1 Answer 1

2

Firebird has had GRANT and REVOKE since its initial version. See the Interbase 6.0 Language Reference, available from http://www.firebirdsql.org/en/reference-manuals/ (near the end of the page).

Eg for GRANT:

GRANT <privileges> ON [TABLE] {tablename | viewname}
      TO {<object> | <userlist> | GROUP UNIX_group}
  | EXECUTE ON PROCEDURE procname TO {<object> | <userlist>}
  | <role_granted> TO {PUBLIC | <role_grantee_list>};
<privileges> = {ALL [PRIVILEGES] | <privilege_list>}
<privilege_list> = SELECT
  | DELETE
  | INSERT
  | UPDATE [(col [, col ...])]
  | REFERENCES [(col [, col ...])] [, <privilege_list> ...]
<object> = PROCEDURE procname
  | TRIGGER trigname
  | VIEW viewname
  | PUBLIC
  [, <object> ...]
<userlist> = [USER] username
  | rolename
  | Unix_user}
  [, <userlist> ...]
  [WITH GRANT OPTION]
<role_granted> = rolename [, rolename ...]
<role_grantee_list> = [USER] username [, [USER] username ...] [WITH ADMIN OPTION]

And for REVOKE:

REVOKE [GRANT OPTION FOR] <privileges> ON [TABLE]
          {tablename | viewname}
       FROM {<object> | <userlist> | <rolelist> | GROUP UNIX_group}
   | EXECUTE ON PROCEDURE procname
       FROM {<object> | <userlist>}
   | <role_granted> FROM {PUBLIC | <role_grantee_list>}};
<privileges> = {ALL [PRIVILEGES] | <privilege_list>} <privilege_list> = {
SELECT
   | DELETE
   | INSERT
   | UPDATE [(col [, col ...])]
   | REFERENCES [(col [, col ...])] [, <privilege_list> ...]}}
<object> ={
   PROCEDURE procname
   | TRIGGER trigname
   | VIEW viewname
   | PUBLIC
   [, <object>]}
<userlist> = [USER] username [, [USER] username ...]
<rolelist> = rolename [, rolename]
<role_granted> = rolename [, rolename ...]
<role_grantee_list> = [USER] username [, [USER] username ...]

The Firebird documentation used to be fragmented in the original Interbase 6 documentation and a language reference update which only described the changes introduced in newer versions.

However there now is a complete Firebird 2.5 language reference.

4
  • Regarding the documentation fragmentation: if I want to find out if a feature is present in V2.5, do I need to search the language reference update for Firebird 1.0 and 1.5 and 2.0 and 2.5 or is it sufficient to only look into the update for 2.5? Are the "update manuals" cumulative?
    – user1822
    Commented May 15, 2015 at 8:41
  • @a_horse_with_no_name The latest language reference update (for 2.5) contains all changes since Firebird 1.0, so you only need to check the last one (+ the Interbase 6 Language Reference). It specifies what version introduced or changed a feature. There is a new full language reference coming (it is already available in Russian, but the translation to English is still in progress). Commented May 15, 2015 at 8:44
  • Thanks, don't know where i have read that this only works above 2.1, it works fine in 1.5, sorry for the mistake. Commented May 15, 2015 at 13:06
  • @MateusViccari You might have looked at a 2.1 (or higher) language reference update, if you look at grant and revoke you might get the impression it was only added in Firebird 2.0 Commented May 15, 2015 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.