fixs and move files

This commit is contained in:
2019-08-03 00:57:00 +02:00
parent 63a50dcb92
commit 7c3028eca2
60 changed files with 171 additions and 105 deletions

View File

@@ -0,0 +1,20 @@
create or replace function edit_comment(reference regclass, id uuid, content text) returns void
language plpgsql as
$$
declare
_id alias for id;
_content alias for content;
begin
if reference = 'article'::regclass then
update comment_on_article c set
content = _content
where c.id = _id;
elseif reference = 'constitution'::regclass then
update comment_on_constitution c set
content = _content
where c.id = _id;
end if;
end;
$$;
-- drop function if exists edit_comment(regclass, uuid, uuid, text, uuid);