Annotation: office.is_sys

CREATE OR REPLACE FUNCTION office.is_sys(integer)
RETURNS boolean

Information: office.is_sys

Schema office
Function Name is_sys
Arguments integer
Owner postgres
Result Type boolean
Description

Implementation: office.is_sys

CREATE OR REPLACE FUNCTION office.is_sys(integer)
 RETURNS boolean
 LANGUAGE plpgsql
AS $function$
BEGIN
    RETURN
    (
        SELECT office.roles.is_system FROM office.users
        INNER JOIN office.roles
        ON office.users.role_id = office.roles.role_id
        WHERE office.users.user_id=$1
    );
END
$function$