refactoring: move sql files

This commit is contained in:
2019-07-29 16:46:17 +02:00
parent 7408f8440b
commit 6560e400f3
27 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
create or replace function find_citizen_by_id(in id uuid, out resource json) language plpgsql as
$$
declare
_id alias for id;
begin
select to_json(t) into resource
from (
select
z.*,
find_user_by_id(z.user_id) as "user"
from citizen as z
where z.id = _id
) as t;
end;
$$;
-- drop function if exists find_citizen_by_id(uuid, inout json);