Skip to content

Change render format#11

Merged
tfausak merged 10 commits intomainfrom
tfausak/2025-07-11-integration-tests
Jul 11, 2025
Merged

Change render format#11
tfausak merged 10 commits intomainfrom
tfausak/2025-07-11-integration-tests

Conversation

@tfausak
Copy link
Copy Markdown
Collaborator

@tfausak tfausak commented Jul 11, 2025

No description provided.

-- It is not possible to round trip all intervals through PostgreSQL on those
-- versions. You should upgrade to at least PostgreSQL version 15. For more
-- information, see this patch:
-- <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=e39f99046>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@tfausak tfausak changed the title Add integration tests Change render format Jul 11, 2025
--
-- >>> render MkInterval { months = 0, days = -1, microseconds = 2 }
-- "@ 0 mon -1 day +2 us"
-- "@ 0 mon -1 day 0 hour 0 min 0 sec +2 us"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the main change. This new format supports a wider range of intervals before overflowing older versions of Postgres.

@tfausak tfausak merged commit 11da8a7 into main Jul 11, 2025
19 checks passed
@tfausak tfausak deleted the tfausak/2025-07-11-integration-tests branch July 11, 2025 20:00
Comment thread source/test-suite/Main.hs
case result of
Right actual -> actual `H.shouldBe` [Postgres.Only interval]
Left somePostgresqlException -> do
rows <- Postgres.query_ connection "select version()"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This should probably use serverVersion instead.

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.

1 participant