-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Parse CREATE FUNCTION into runnable functions #1174
Conversation
I resolved the conflicts and skipped the new |
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read through this one to ramp up on the create function
changes and left a couple minor comments. Overall, seems like a good base to keep building on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No major feedback on top of what Jason already said, but worth asking if there's a true parser out there that might be better supported. Surely somebody has a yacc grammar for parsing this language somewhere.
This implements parsing of
CREATE FUNCTION
into the same expected set of operations as the handcoded examples. This means that we are able to writeCREATE FUNCTION
statements that are runnable, and the interpreter is able to properly execute said functions.At the moment, the function provider used in GMS does not allow for adding new functions, so the test is skipped. I've confirmed it does work though if we hack around the provider limitation. It's also worth noting that we have to rely on the new
pg_analyze
package in order to handle PL/pgSQL. I attempted to add support within our parser, but the syntax conflicts with regular SQL syntax in ways that can't really be reconciled, so this was the only choice.