CREATE OR REPLACE FUNCTION office.get_role_id_by_use_id(user_id integer_strict) RETURNS integer LANGUAGE plpgsql AS $function$ BEGIN RETURN ( SELECT office.users.role_id FROM office.users WHERE office.users.user_id=$1 ); END $function$