-
Notifications
You must be signed in to change notification settings - Fork 1
Change render format #11
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
Conversation
| -- 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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discovered here: yesodweb/persistent#1604 (comment)
Also fix artifact names.
| -- | ||
| -- >>> 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" |
There was a problem hiding this comment.
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.
| case result of | ||
| Right actual -> actual `H.shouldBe` [Postgres.Only interval] | ||
| Left somePostgresqlException -> do | ||
| rows <- Postgres.query_ connection "select version()" |
There was a problem hiding this comment.
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.
No description provided.