Revision 12530
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
2485 | 2485 |
|
2486 | 2486 |
|
2487 | 2487 |
-- |
2488 |
-- Name: raise(text, text); Type: FUNCTION; Schema: util; Owner: - |
|
2489 |
-- |
|
2490 |
|
|
2491 |
CREATE FUNCTION raise(type text, msg text) RETURNS void |
|
2492 |
LANGUAGE sql IMMUTABLE |
|
2493 |
AS $_$ |
|
2494 |
SELECT util.eval($$ |
|
2495 |
CREATE OR REPLACE FUNCTION pg_temp.__raise() |
|
2496 |
RETURNS void AS |
|
2497 |
$BODY1$ |
|
2498 |
BEGIN |
|
2499 |
RAISE $$||$1||$$ USING MESSAGE = $$||quote_nullable($2)||$$; |
|
2500 |
END; |
|
2501 |
$BODY1$ |
|
2502 |
LANGUAGE plpgsql IMMUTABLE |
|
2503 |
COST 100; |
|
2504 |
$$); |
|
2505 |
|
|
2506 |
SELECT util.eval($$SELECT pg_temp.__raise()$$); |
|
2507 |
$_$; |
|
2508 |
|
|
2509 |
|
|
2510 |
-- |
|
2488 | 2511 |
-- Name: raise_error_notice(text); Type: FUNCTION; Schema: util; Owner: - |
2489 | 2512 |
-- |
2490 | 2513 |
|
Also available in: Unified diff
schemas/util.sql: added raise(type text, msg text)