Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a34893b

Browse files
authored
comment on function raise_exception
1 parent 62a1bad commit a34893b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

‎functions/raise_exception.sql‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ begin
2626
message = coalesce(message, 'Unhandled value'),
2727
detail = coalesce(detail, coalesce(to_json(value), 'null'::json)::text),
2828
hint = coalesce(hint, 'See value in detail as JSON'),
29-
errcode = coalesce(errcode, 'raise_exception'),
29+
errcode = coalesce(errcode, 'raise_exception'/*ERRCODE_RAISE_EXCEPTION (P0001)*/),
3030
column = coalesce("column", ''),
3131
constraint = coalesce("constraint", ''),
3232
table = coalesce("table", ''),
@@ -36,6 +36,22 @@ begin
3636
end;
3737
$$;
3838

39+
comment on function raise_exception(
40+
value anyelement,
41+
message text,
42+
detail text,
43+
hint text,
44+
errcode text,
45+
"column" text,
46+
"constraint" text,
47+
"table" text,
48+
"schema" text
49+
) is $$
50+
Function to throwing an error for user value.
51+
Uses in SQL language.
52+
Wrapper for RAISE command with EXCEPTION level in PL/pgSQL language.
53+
$$;
54+
3955
--TEST FUNCTION
4056
do $$
4157
DECLARE

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /