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

Undocumented breaking change of stringValue.Contains(value) in v8 #343

Closed
profet23 opened this issue May 9, 2024 · 1 comment
Closed

Comments

@profet23
Copy link

profet23 commented May 9, 2024

Prior to v8, our efcore queries that utilized stringValue.Contains(value) mapped to: strpos(stringValue, value) > 0.

This is documented here: https://www.npgsql.org/efcore/mapping/translations.html.

After upgrading to v8, these same efcore queries now map to stringValue LIKE '%value%'.

This doesn't break the queries per say, but it did break our index usages. We had several indexes that used the strpos to mirror the npgsql efcore query mapping, and those all needed to be updated.

This can cause havoc on a production database.

Could we get the documentation updated here? https://www.npgsql.org/efcore/mapping/translations.html

And list it as a breaking change?

@roji roji transferred this issue from npgsql/efcore.pg May 11, 2024
@roji
Copy link
Member

roji commented May 11, 2024

We had several indexes that used the strpos to mirror the npgsql efcore query mapping, and those all needed to be updated.

Just to confirm, here you're referring to PostgreSQL expression indexes, right?

Could we get the documentation updated here?

Thanks, I did this in 644ca58.

And list it as a breaking change?

I don't think this constitutes a breaking change. Yes, if you have an expression index, a SQL translation change would cause it to no longer get used, but there's very little that doesn't constitute a breaking change at that point...

@roji roji closed this as completed May 11, 2024
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

No branches or pull requests

2 participants