I wonder how to trigger an error message immediately when user enters a command instead of when the user commits the transaction? I am currently doing the validation under CDB_SUB_PREPARE but looks like this validation gets kicked in only when the user commits the transaction.
I was under impression that CDB_SUB_PREPARE is every time user enters a command ; and CDB_SUB_COMMIT is when the user commits.
Please let me know if my understanding is wrong.
root@cavium-thunderx 21:25:12% set link vlan-map 0 vid 0 [ok][2018-01-12 21:25:22]  root@cavium-thunderx 21:25:22% commit Aborted: resource denied: 0 is invalid (range is 2-4094) (abort the transaction) [error][2018-01-12 21:25:25]  root@cavium-thunderx 21:25:25%