authen
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_tr_configs_init
Parameters
Name
Type
Mode
Definition
BEGIN IF (TG_OP='UPDATE') and (old.flag is distinct from new.flag) THEN NEW.config_value := CASE when new.flag = 'S' then sys.encrypt_text(OLD.config_value, sys.get_secret('config-key')) when old.flag = 'S' then sys.decrypt_text(OLD.config_value, sys.get_secret('config-key')) else NEW.config_value END; ELSIF (new.flag = 'S') and (TG_OP = 'INSERT' or old.config_value is distinct from new.config_value) THEN NEW.config_value := sys.encrypt_text(NEW.config_value, sys.get_secret('config-key')); END IF; RETURN NEW; END;