summaryrefslogtreecommitdiff
path: root/sql/functions/resume.delete_resume.sql
blob: 9a3c06f6c8670e17f080c6aed4d216c65444368f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
drop function resume.delete_resume (
    p_id bigint
);

create or replace function resume.delete_resume (
    p_id bigint
)
returns void
as $$
begin
    delete from resume.resume_contactinfo
    where resume_id = p_id;

    delete from resume.resume_education
    where resume_id = p_id;

    delete from resume.resume_job
    where resume_id = p_id;

    delete from resume.resume_language
    where resume_id = p_id;

    delete from resume.resume
    where id = p_id;
end;
$$ language plpgsql;