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

Fix Postgres syntax for NOWAIT #377

Merged
merged 3 commits into from Sep 7, 2023

Conversation

ttuegel
Copy link
Contributor

@ttuegel ttuegel commented Sep 5, 2023

Before submitting your PR, check that you've:

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).

Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this always been broken? Or is this a new postgres thing?

Please update the changelog and cabal file with a patch bump. Thanks!

@ttuegel
Copy link
Contributor Author

ttuegel commented Sep 7, 2023

Has this always been broken? Or is this a new postgres thing?

As far as I know, this has always been broken. NOWAIT has been the syntax since at least PostgreSQL 11.

@parsonsmatt
Copy link
Collaborator

Indeed - this test fails:

testPostgresqlLocking :: SpecDb
testPostgresqlLocking = do
    describe "noWait" $ do
        itDb "doesn't crash" $ do
            select $ do
                t <- Experimental.from $ table @Person
                EP.forUpdateOf t EP.noWait
                pure t

            asserting noExceptions

    describe "Monoid instance" $ do

Could you add that test in to test/PostgreSQL/Test.hs and update changelog/cabal with patch? Thanks!

Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

@parsonsmatt parsonsmatt merged commit d805bb0 into bitemyapp:master Sep 7, 2023
7 checks passed
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.

None yet

2 participants