-
- Downloads
Implement the IS DISTINCT FROM operator per SQL99.
Reused the Expr node to hold DISTINCT which strongly resembles the existing OP info. Define DISTINCT_EXPR which strongly resembles the existing OPER_EXPR opType, but with handling for NULLs required by SQL99. We have explicit support for single-element DISTINCT comparisons all the way through to the executor. But, multi-element DISTINCTs are handled by expanding into a comparison tree in gram.y as is done for other row comparisons. Per discussions, it might be desirable to move this into one or more purpose-built nodes to be handled in the backend. Define the optional ROW keyword and token per SQL99. This allows single-element row constructs, which were formerly disallowed due to shift/reduce conflicts with parenthesized a_expr clauses. Define the SQL99 TREAT() function. Currently, use as a synonym for CAST().
Showing
- src/backend/executor/execQual.c 82 additions, 1 deletionsrc/backend/executor/execQual.c
- src/backend/nodes/outfuncs.c 4 additions, 1 deletionsrc/backend/nodes/outfuncs.c
- src/backend/nodes/readfuncs.c 3 additions, 1 deletionsrc/backend/nodes/readfuncs.c
- src/backend/optimizer/path/costsize.c 2 additions, 1 deletionsrc/backend/optimizer/path/costsize.c
- src/backend/optimizer/util/clauses.c 100 additions, 4 deletionssrc/backend/optimizer/util/clauses.c
- src/backend/parser/gram.y 214 additions, 87 deletionssrc/backend/parser/gram.y
- src/backend/parser/keywords.c 2 additions, 1 deletionsrc/backend/parser/keywords.c
- src/backend/parser/parse_expr.c 12 additions, 1 deletionsrc/backend/parser/parse_expr.c
- src/backend/utils/adt/ruleutils.c 16 additions, 1 deletionsrc/backend/utils/adt/ruleutils.c
- src/include/nodes/primnodes.h 3 additions, 2 deletionssrc/include/nodes/primnodes.h
Loading
Please register or sign in to comment