Am I forgetting some limitation ? I get "ERROR: syntax error at ornear "$1" at character 22" with this:
CREATE FUNCTION public.fn_b_import( text ) RETURNS void AS 'COPY b_import FROM $1 ;'LANGUAGE 'sql' STABLE;