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

Problem when deparsing 'EXCEPT' #125

Closed
primeapple opened this issue Jan 23, 2019 · 3 comments
Closed

Problem when deparsing 'EXCEPT' #125

primeapple opened this issue Jan 23, 2019 · 3 comments

Comments

@primeapple
Copy link

Hi there,

I just found another bug in deparse. (Btw, @lfittl , i'm probably going to find some more, since I'm testing this a lot currently. Do you want me to continue submitting bugreports or should I stop to not fill your issues list up?)

This bug is when you use a query that contains the EXCEPT keyword and then try to deparse the query. This problem seems to be something deeper, since it does NOT throw an exception.

Example:

PgQuery.parse("SELECT a FROM x EXCEPT SELECT a FROM Y").deparse
=> ""
PgQuery.parse("SELECT a FROM x UNION (SELECT a from Z EXCEPT SELECT a FROM Y)").deparse
=> "SELECT \"a\" FROM \"x\" UNION "

I hope you can trace this issue down quickly! Have a great time!

@herwinw
Copy link
Contributor

herwinw commented Jan 29, 2019

Btw, @lfittl , i'm probably going to find some more, since I'm testing this a lot currently. Do you want me to continue submitting bugreports or should I stop to not fill your issues list up?

I would say to just keep them coming. I'm pretty sure the deparse module is far from complete (there are a few PRs open to improve it).

@lfittl
Copy link
Member

lfittl commented Jan 30, 2019

@primeapple Please do - I apologize for the backlog here, I'm very much aware of the contributions and hoping to review/merge things in the next days, as well as tackle open issues :)

@lfittl
Copy link
Member

lfittl commented Jul 1, 2019

Fixed by 823155c

@lfittl lfittl closed this as completed Jul 1, 2019
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

No branches or pull requests

3 participants