Skip to content

Ensure user role exists #3679

Closed Answered by laurenceisla
NickEmpetvee asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

in order to prevent the change if the role doesn't exist?

If I'm not mistaken, the RAISE error will rollback the transaction and the insert won't be completed, even if it's in an AFTER trigger. But still, I agree that it's more accurate to have it in a BEFORE trigger.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@NickEmpetvee
Comment options

Answer selected by NickEmpetvee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants