-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
tree: allow string concat with any non-array type (anynonarray approach) #43143
Conversation
The remaining test failure
|
looks like optimiser makes some assumptions about types: |
Previously, the || concat operator only worked on string pairs. Postgres supports concatenation between strings and any other non-array type. This patch adds support for that as well. To support this, we add another heuristic to the overload detection to prefer omitting "Any" if possible. Furthermore, we add a new `AnyNonArray` type constant to types.go to encode not being able to append to arrays. Release note (sql change): the concatenation operator || is now usable between strings and any other non-array type.
let's try #43190. |
Refs #41872. This method solves the problem with heavy edits to the
type system.
Previously, the || concat operator only worked on string pairs. Postgres
supports concatenation between strings and any other non-array type. This
patch adds support for that as well.
To support this, we add another heuristic to the overload detection to
prefer omitting "Any" if possible. Furthermore, we add a new
AnyNonArray
type constant to types.go to encode not being able toappend to arrays.
Release note (sql change): the concatenation operator || is now usable
between strings and any other non-array type.