Skip to content

feat: plpgsql check #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 1, 2025
Merged

feat: plpgsql check #469

merged 16 commits into from
Aug 1, 2025

Conversation

psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented Jul 25, 2025

adds support for plpgsql_check. the approach is even simpler as described in the issue: if we encounter a create function statement, we start a transaction, run the statement, then run plpgsql_check on it, and then rollback the transaction.

the remaining code is just about translating the location information we get from the extension into a good range.

todo:

  • integrate into workspace api
  • to get span, move from the first word / occurrence in the line to the next semicolon
  • handle return trigger by checking for all variations
  • make sure we do not report create fn syntax errors if plpgsql_check is enabled
  • check why "not a known variable" is not getting the right span

closes #190

@psteinroe psteinroe marked this pull request as draft July 25, 2025 23:14
@psteinroe psteinroe marked this pull request as ready for review August 1, 2025 06:22
@psteinroe psteinroe merged commit bb686b9 into main Aug 1, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

integrate plpgsql_check
1 participant