CREATE OR REPLACE FUNCTION gtcnadaconsta(person int4) 
RETURNS bool as $BODY$
DECLARE
    v_result boolean;
BEGIN
    SELECT into v_result SUM(quantidade) = 0 FROM gtcObterRestricoes(person);
    
    RETURN v_result;
END; 
$BODY$ language plpgsql;
