Project

General

Profile

« Previous | Next » 

Revision 14218

schemas/util.sql: raise(): support SQLSTATE values

View differences:

util.sql
4048 4048
-- $__BODY1$ in case msg contains $BODY1$ (in SQL)
4049 4049
$__BODY1$
4050 4050
BEGIN
4051
	RAISE $$||$1||$$ USING MESSAGE = $$||util.quote_as_str($2)||$$;
4051
	RAISE $$||util.raise_expr(type)||$$ USING MESSAGE = $$||
4052
util.quote_as_str($2)||$$;
4052 4053
		--quote_as_str() to avoid "RAISE statement option cannot be null" errors
4053 4054
END;
4054 4055
$__BODY1$

Also available in: Unified diff