Revision 12534
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
972 | 972 |
CREATE FUNCTION debug_print_return_value(value anyelement, encode boolean DEFAULT false) RETURNS anyelement |
973 | 973 |
LANGUAGE sql IMMUTABLE |
974 | 974 |
AS $_$ |
975 |
SELECT util.raise_notice('returns: '
|
|
975 |
SELECT util.raise('NOTICE', 'returns: '
|
|
976 | 976 |
||(CASE WHEN $2 THEN util.quote_typed($1) ELSE $1::text END)); |
977 | 977 |
SELECT $1; |
978 | 978 |
$_$; |
... | ... | |
987 | 987 |
AS $_$ |
988 | 988 |
/* newline before so the query starts at the beginning of the line. |
989 | 989 |
newline after to visually separate queries from one another. */ |
990 |
SELECT util.raise_notice($$
|
|
990 |
SELECT util.raise('NOTICE', $$
|
|
991 | 991 |
$$||util.runnable_sql($1)||$$ |
992 | 992 |
$$||COALESCE(util.explain2notice_msg_if_can($1), '')) |
993 | 993 |
$_$; |
... | ... | |
1447 | 1447 |
CREATE FUNCTION explain2notice(sql text) RETURNS void |
1448 | 1448 |
LANGUAGE sql |
1449 | 1449 |
AS $_$ |
1450 |
SELECT util.raise_notice(util.explain2notice_msg($1))
|
|
1450 |
SELECT util.raise('NOTICE', util.explain2notice_msg($1))
|
|
1451 | 1451 |
$_$; |
1452 | 1452 |
|
1453 | 1453 |
|
... | ... | |
2526 | 2526 |
CREATE FUNCTION raise_error_notice(msg text) RETURNS void |
2527 | 2527 |
LANGUAGE sql IMMUTABLE |
2528 | 2528 |
AS $_$ |
2529 |
SELECT util.raise_notice('ERROR: '||$1)
|
|
2529 |
SELECT util.raise('NOTICE', 'ERROR: '||$1)
|
|
2530 | 2530 |
$_$; |
2531 | 2531 |
|
2532 | 2532 |
|
Also available in: Unified diff
schemas/util.sql: use util.raise(NOTICE, ...) instead of util.raise_notice()