I have a stored procedure for copying details from csv file to database table.
CREATE FUNCTION gis_portal.copycsv(IN path text) RETURNS void AS $$
COPY gis_portal.temp_excel FROM path WITH DELIMITER ','
$$ LANGUAGE sql VOLATILE LEAKPROOF;
But it is showing error as:
ERROR: syntax error at or near "path" SQL state: 42601 Character: 101
Here path is dynamic. Please help me.