-
Notifications
You must be signed in to change notification settings - Fork 55
[Bug]: Failure in parsing correct postgresql partially duplicates output #2208
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Failure to parse valid postgresql code, sqlfluff handles it correctly.
CREATE FUNCTION test(input_text TEXT)
RETURNS BOOLEAN AS $$
BEGIN
SELECT {test};
END;
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
[sqruff]
dialect = postgres
templater=placeholder
[sqruff:templater:placeholder]
param_regex = .*?\}
1=test
Formats as
CREATE FUNCTION test(input_text TEXT)
RETURNS BOOLEAN AS $$
BEGIN
SELECT {test};
END;
$$ LANGUAGE plpgsql IMMUTABLE STRICT; SELECT {test};
END;
$$ LANGUAGE plpgsql IMMUTABLE STRICT;
Here is a play ground link with the entire setup.
https://playground.quary.dev/?secondary=Format#eNpNjl9rwjAUxb/KJfiwjTHYa6WMtMtKoabQpjBYhhS9doUaY3IFQfrdl4iID5dz/5z741yYP04sYXkjuBLw1clclbUEQk9Po7EnWhOeCZT4Vs/aadMI1TWyhayuK8El8BZgsQCAeMxEUcrYhBlaUYlcwSWi5mXcCvl51eCvuCw6Xgiwkx1CBChXq07xrBLQqqbM1fIKjMVemUei0Qw+BP3xR3fa7X612Y79hBuCFOzB0+DQa0O4t1NP6NIgG/w7TFuMGHN7S+6G5MEQYLZ3/X7tcMBzAL69fGg9a/OexvBs/geUFmPL
Version
0.34
Checked in Playground
- I have checked this bug in the playground.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working