
create or replace procedure public.import_budget_from_csv()
language plpgsql
as $$
begin

truncate table public.budgetimport;

copy
	public.budgetimport(dt, amount, description)
from
	'/usr/share/budget.csv'
delimiter ',' csv header;

end
$$;

GRANT EXECUTE ON PROCEDURE public.update_budget_from_import() TO acedanger;
GRANT EXECUTE ON PROCEDURE public.update_budget_from_import() TO budgetuser;
