feature #4: create function for article

implement generate_version_number()
This commit is contained in:
2019-07-27 01:19:25 +02:00
parent 2286568ae9
commit ce2f2b4f2a
11 changed files with 144 additions and 17 deletions

View File

@@ -0,0 +1,18 @@
create or replace function find_article_by_id(in id uuid, out resource json) language plpgsql as
$$
declare
_id alias for id;
begin
select to_json(t)
from (
select
a.*,
find_citizen_by_id(a.created_by_id) as created_by
into resource
from article as a
where a.id = _id
) as t;
end;
$$;
-- drop function if exists find_article_by_id(uuid, out json);