Revision 14217
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
4084 | 4084 |
|
4085 | 4085 |
|
4086 | 4086 |
-- |
4087 |
-- Name: raise_expr(text); Type: FUNCTION; Schema: util; Owner: - |
|
4088 |
-- |
|
4089 |
|
|
4090 |
CREATE FUNCTION raise_expr(raise_type text) RETURNS text |
|
4091 |
LANGUAGE sql IMMUTABLE |
|
4092 |
AS $_$ |
|
4093 |
SELECT CASE |
|
4094 |
WHEN util.is_raise_condition(raise_type) THEN raise_type |
|
4095 |
WHEN util.is_sqlstate(raise_type) THEN $$SQLSTATE $$||quote_literal(raise_type) |
|
4096 |
ELSE raise_type |
|
4097 |
END |
|
4098 |
$_$; |
|
4099 |
|
|
4100 |
|
|
4101 |
-- |
|
4087 | 4102 |
-- Name: raise_undefined_column(col); Type: FUNCTION; Schema: util; Owner: - |
4088 | 4103 |
-- |
4089 | 4104 |
|
Also available in: Unified diff
schemas/util.sql: added raise_expr(raise_type)