Language-Level Privileges
Informix® also supports language-level privileges, which specify the programming languages of UDRs that users who have been granted Usage privileges for a given language can register in the database.
This is the syntax of the USAGE ON LANGUAGE clause for granting Usage privileges on a programming language:
The SPL, C, and JAVA keywords can specify a programming language in the USAGE ON LANGUAGE clause. Each GRANT USAGE ON LANGUAGE statement can specify no more than one programming language. By default, Usage privilege on SPL is granted to PUBLIC.
When a user executes the CREATE FUNCTION or CREATE PROCEDURE statement to register a UDR that is written in the SPL, C, or Java™ language, the database server verifies that the user has the Usage privilege on the language in which the UDR is written. If the IFX_EXTEND_ROLE configuration parameter has enabled the built-in EXTEND role, only users who also hold that role can register or drop UDRs written in the C language or in the Java™ language, even if the users hold USAGE ON LANGUAGE privileges for those languages.
GRANT USAGE ON LANGUAGE C TO developers;
If
the preceding example executes successfully, users who hold the developers role
as their current role can create or drop C routines (if they also
hold the EXTEND role, or if the IFX_EXTEND_ROLE parameter is set to 0
or
to Off
).For information on other access privileges that these statements require, see CREATE FUNCTION statement and CREATE PROCEDURE statement.