On 08/12/2012 03:07 AM, Andrus wrote:
> I’m looking for a way to raise error from sql select if some condition
> is met.
> Tried code below to got error shown in comment.
> How to fix ?
Create a small pl/pgsql function that RAISEs a message, and call that
from your EXECUTEd SQL via a CASE ... WHEN .
--
Craig Ringer