-
Notifications
You must be signed in to change notification settings - Fork 181
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
fix some plpgsql errors #244
Conversation
Thanks for the patch, and conceptually looks good! However it appears there is a problem with the I believe this is actually a larger issue with how we handle |
53a97cc
to
56d91d3
Compare
- variable "$1" does not exist - collations are not supported by type - - variable "ref" must be of type cursor or refcursor
…TURN NEXT with no expression
Currently the value of negative constants are omitted. Only omit *0* constants. An earlier attempt (pganalyze#244) caused a mismatch with the protobuf json output, since that wants to omit values that are equal to the default value. I don't *really* think that is particularly sensible behavior for an integer constant in an AST, but oh well. Fixes pganalyze#243.
Currently the value of negative constants are omitted. Only omit *0* constants. An earlier attempt (pganalyze#244) caused a mismatch with the protobuf json output, since that wants to omit values that are equal to the default value. I don't *really* think that is particularly sensible behavior for an integer constant in an AST, but oh well. Fixes pganalyze#243.
Currently the value of negative constants are omitted. Only omit *0* constants. An earlier attempt (pganalyze#244) caused a mismatch with the protobuf json output, since that wants to omit values that are equal to the default value. I don't *really* think that is particularly sensible behavior for an integer constant in an AST, but oh well. Fixes pganalyze#243.
@MGorkov Thanks for your contributions in this PR! I ended up reworking them a bit and merging them in #263. I did not take all changes, but tried to keep it more narrow to the parts that looked most relevant to make parsing work in cases where it didn't work before. If there are additional changes you'd like to see, could you propose these in a new PR? I'll close this here for now, since I believe the main issues are addressed. |
This patch fixes the #243 , #160 , #248 issues and the following errors:
"variable "$1" does not exist"
"collations are not supported by type -"
"variable "ref" must be of type cursor or refcursor"
missing expression at or near ";"
changes in JSON: