Skip to content
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

(de?)parse fails #86

Closed
benchub opened this issue Aug 30, 2018 · 2 comments · Fixed by #99
Closed

(de?)parse fails #86

benchub opened this issue Aug 30, 2018 · 2 comments · Fixed by #99

Comments

@benchub
Copy link

benchub commented Aug 30, 2018

print PgQuery.parse("update foo set a=?, b=?").deparse

drops the comma, resulting in invalid sql

@lfittl
Copy link
Member

lfittl commented Sep 7, 2018

@benchub Thanks for opening the issues regarding deparsing!

Your help would be very welcome in fixing these, the logic is in https://github.com/lfittl/pg_query/blob/master/lib/pg_query/deparse.rb and shouldn't be too hard to understand. We should also make sure to add tests for each of these cases, so it doesn't regress in a future Postgres version.

@benchub
Copy link
Author

benchub commented Sep 7, 2018 via email

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 a pull request may close this issue.

2 participants