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

Avoid generating an empty list as the left operand to NOT IN #273

Merged
merged 2 commits into from
Jul 9, 2021

Conversation

cdparks
Copy link
Contributor

@cdparks cdparks commented Jul 8, 2021

Postgres treats x in () and x not in () as syntax errors. Instead translate:

  x in ()      ⇒  FALSE
  x not in ()  ⇒  TRUE

Older versions of esqueleto did both of these, but apparently the latter got lost in the most recent version. See issue #272.

Before submitting your PR, check that you've:

  • Bumped the version number. I'm not sure what the version number should be, looks like esqueleto uses PVP? I bumped the smallest component to 3.5.2.1 since this is a bugfix
  • Documented new APIs with Haddock markup. N/A
  • Added @since declarations to the Haddock. N/A
  • Ran stylish-haskell and otherwise adhered to the style guide.

After submitting your PR:

  • Update the Changelog.md file with a link to your PR.
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts).

Postgres treats 'x in ()' and 'x not in ()' as syntax errors. Instead
translate:

  x in ()      ⇒  FALSE
  x not in ()  ⇒  TRUE

Older versions of esqueleto did this, but apparently the latter got
lost.
@cdparks
Copy link
Contributor Author

cdparks commented Jul 8, 2021

@belevy let me know if I bumped the version/updated the changelog correctly

@belevy
Copy link
Collaborator

belevy commented Jul 9, 2021

Yah, this is fixing a bug that was introduced. The behavior isnt new. I think the minor bump is fine.

@belevy belevy merged commit e8271a0 into bitemyapp:master Jul 9, 2021
@belevy
Copy link
Collaborator

belevy commented Jul 9, 2021

Thank you for the fix :D

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.

2 participants