-
- Downloads
Fix WITH attached to a nested set operation (UNION/INTERSECT/EXCEPT).
Parse analysis neglected to cover the case of a WITH clause attached to an intermediate-level set operation; it only handled WITH at the top level or WITH attached to a leaf-level SELECT. Per report from Adam Mackler. In HEAD, I rearranged the order of SelectStmt's fields to put withClause with the other fields that can appear on non-leaf SelectStmts. In back branches, leave it alone to avoid a possible ABI break for third-party code. Back-patch to 8.4 where WITH support was added.
Showing
- src/backend/nodes/copyfuncs.c 1 addition, 1 deletionsrc/backend/nodes/copyfuncs.c
- src/backend/nodes/equalfuncs.c 1 addition, 1 deletionsrc/backend/nodes/equalfuncs.c
- src/backend/nodes/nodeFuncs.c 2 additions, 2 deletionssrc/backend/nodes/nodeFuncs.c
- src/backend/nodes/outfuncs.c 1 addition, 1 deletionsrc/backend/nodes/outfuncs.c
- src/backend/parser/analyze.c 16 additions, 13 deletionssrc/backend/parser/analyze.c
- src/backend/parser/parse_cte.c 14 additions, 1 deletionsrc/backend/parser/parse_cte.c
- src/backend/parser/parse_type.c 1 addition, 1 deletionsrc/backend/parser/parse_type.c
- src/include/nodes/parsenodes.h 1 addition, 1 deletionsrc/include/nodes/parsenodes.h
- src/test/regress/expected/with.out 51 additions, 0 deletionssrc/test/regress/expected/with.out
- src/test/regress/sql/with.sql 35 additions, 0 deletionssrc/test/regress/sql/with.sql
Loading
Please register or sign in to comment