-
Notifications
You must be signed in to change notification settings - Fork 648
SQL: Fix metadata handling in to_semver_no_prerelease()
function
#3886
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
e0aaa6c
to
0893b94
Compare
@@ -88,8 +88,10 @@ tracing-subscriber = "0.2" | |||
url = "2.1" | |||
|
|||
[dev-dependencies] | |||
bigdecimal = { version = ">= 0.0.10, < 0.2.0" } |
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.
unfortunately diesel
does not reexport the version that they depend on, so we have to add this here ourselves
claim = "0.5" | ||
conduit-test = "0.9.0-alpha.4" | ||
diesel = { version = "1.4.0", features = ["numeric"] } |
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.
the numeric
feature is necessary because the semver_triple
returned by to_semver_no_prerelease()
is based on the Numeric
SQL type.
0893b94
to
b812fe7
Compare
While the changes here look correct, my main worry is the performance of the already slow reverse dependencies endpoint. Trying to run the old and the new function in a local database dump shows a 16% slowdown:
I'd like to hear @jtgeibel's opinion here too. |
we could consider using https://www.postgresql.org/docs/current/ddl-generated-columns.html to have a generated (and stored) the only downside of this is that generated columns were only introduced in Postgres 12 and apparently we're still using v11 in production. I think that a 16% slowdown for a correctness bug is worth it though, and with the suggestion above we should have a viable way forward to make it much faster than before too. |
5822f36
to
65f727d
Compare
in our weekly team meeting today we decided to delay this bugfix until the performance concerns are addressed, which likely requires us to resolve #3480 first. |
☔ The latest upstream changes (presumably #3958) made this pull request unmergeable. Please resolve the merge conflicts. |
closing in favor of #4022 |
Resolves #3882