Improve error message on sql function
This commit is contained in:
@@ -15,7 +15,7 @@ begin
|
|||||||
insert into comment_on_constitution (id, created_by_id, target_id, content, parent_comment_id)
|
insert into comment_on_constitution (id, created_by_id, target_id, content, parent_comment_id)
|
||||||
values (_new_id, _created_by_id, _target_id, _content, _parent_comment_id);
|
values (_new_id, _created_by_id, _target_id, _content, _parent_comment_id);
|
||||||
else
|
else
|
||||||
raise exception 'comment with target as "%", is no implemented', reference::text;
|
raise exception 'comment with target as "%", is not implemented', reference::text;
|
||||||
end if;
|
end if;
|
||||||
_id = _new_id;
|
_id = _new_id;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ begin
|
|||||||
values (_created_by_id, _target_id)
|
values (_created_by_id, _target_id)
|
||||||
on conflict (created_by_id, target_id) do nothing;
|
on conflict (created_by_id, target_id) do nothing;
|
||||||
else
|
else
|
||||||
raise exception '% no implemented', reference::text;
|
raise exception '% no implemented for follow', reference::text;
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ begin
|
|||||||
anonymous = excluded.anonymous,
|
anonymous = excluded.anonymous,
|
||||||
updated_at = now();
|
updated_at = now();
|
||||||
else
|
else
|
||||||
raise exception '% no implemented', reference::text;
|
raise exception '% no implemented for vote', reference::text;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
select count_vote(reference, _target_id) into resource;
|
select count_vote(reference, _target_id) into resource;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ begin
|
|||||||
order by version_number desc
|
order by version_number desc
|
||||||
limit 1;
|
limit 1;
|
||||||
else
|
else
|
||||||
raise exception '% is not implemented', tablename::text;
|
raise exception '% is not implemented for function "generate_version_number"', tablename::text;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
if not found then
|
if not found then
|
||||||
@@ -103,7 +103,7 @@ begin
|
|||||||
where c.version_id = _version_id
|
where c.version_id = _version_id
|
||||||
and c.last_version = true;
|
and c.last_version = true;
|
||||||
else
|
else
|
||||||
raise exception '% is not implemented', tablename::text;
|
raise exception '% is not implemented for function "set_all_version_to_old"', tablename::text;
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
@@ -145,7 +145,7 @@ begin
|
|||||||
where c1.version_id = _version_id
|
where c1.version_id = _version_id
|
||||||
and c1.id = c3.id;
|
and c1.id = c3.id;
|
||||||
else
|
else
|
||||||
raise exception '% is not implemented', tablename::text;
|
raise exception '% is not implemented for function "set_correct_last_version"', tablename::text;
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
|||||||
Reference in New Issue
Block a user