Admin_mode

SQL

FUNCTION Admin_mode(IN name Identifier, IN category INT, IN mode BOOLEAN); RETURNS BOOLEAN;


Parametry

name
object name (stored procedure or query)
category
object category (CATEG_PROC or CATEG_CURSOR)
mode
request for enabling/disabling/detection of the admin mode


Od verze

8.0

Popis

This function serves for controlling and setting the admin mode of stored procedures and query evaluation. If this mode is enabled, the data and object privileges in the same scheme will not be checked during this procedure runtime. If the procedure in the admin mode calls another procedure from the same scheme, then this procedure will be running in admin mode too.

If the mode parameter equals TRUE, this function will enable the admin mode for a procedure or query name. If mode equals FALSE, the admin mode will be disabled. If mode equals NULL, the mode will not change, but you'll be able to get its current state from the return value.

The Admin_mode function with mode parameter other than NULL may be called only by a user in the Author role.

The name parameter may be set in the scheme_name.object_name form. If the scheme name is not set, the object is searched for in the current scheme.



Návratová hodnota

Returns TRUE, if the name object was in the admin mode, FALSE otherwise.

Returns NULL on error (e.g. if the calling client is not a part of the Author role or if the name parameter specified a non-existing procedure).



Příklad

CALL Admin_mode(APL1.PROC1, CATEG_PROC, TRUE);

Viz