Postgresql parsing fail on function body: no viable alternative at input
Opened this issue · 2 comments
mermetbt commented
Hello,
Thanks for this PR #416
I've noticed the parser is not working on function like this:
CREATE FUNCTION public.myfunction() RETURNS void
LANGUAGE sql
AS $$
-- Do something
$$;
with the output being:
Error: no viable alternative at input '$$\n\t-- Do something\n $$;\n'
Regards.
mermetbt commented
As a workaround, I use this simple sed command to remove the functions from the sql dump sed '/CREATE FUNCTION/,/\$\$;/d' input.sql > output.sql