Thread: Raise exception from regular SQL?

Raise exception from regular SQL?

From
"Steve - DND"
Date:
I'm trying to add some clarity to the rules I have on my tables. When a rule
is broken, I want to give a more informative message, so that the client
side can deal with it in a nicer manner. Right now I'm creating plpgsql
functions, and raising an exception in there with the customized text.

Is there a way to raise exceptions with regular SQL so that I don't have to
go to plpgsql?

Thanks,
Steve