sql: fix tuple type-checking #98152
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-queries
SQL Queries Team
Our type-checking logic for comparison of tuple-typed expressions assumes that the inputs expressions are
tree.Tuple
. This is deeply flawed because there are all sorts of other expressions that are nottree.Tuple
but have the type of tuple. Our type-checking code should never be breaking apart expressions liketree.Tuple
. It must operate on the types of sub-expressions, not the sub-expressions themselves.A core hurdle to get over is our overload resolution, which currently operates on
tree.Expr
, rather thentypes.T
to determine the correct overload for an operator and it's input. We should be following the logic described in detail here: https://www.postgresql.org/docs/current/typeconv-oper.htmlJira issue: CRDB-25105
The text was updated successfully, but these errors were encountered: