Handle nodes that may appear in GraphPattern expression trees

expression_tree_mutator_impl() did not handle T_GraphPattern,
T_GraphElementPattern, and T_GraphPropertyRef.  The corresponding
expression_tree_walker_impl() already handles all three node types.
This causes an "unrecognized node type" error whenever a GRAPH_TABLE
appeared in an expression tree.

While at it, also update raw_expression_tree_walker() and
expression_tree_walker() to handle missing nodes that may appear in
GraphPattern expression trees.  When raw_expression_tree_walker() is
called, GraphElementPattern::labelexpr contains ColumnRefs instead of
GraphLabelRefs.  Hence those are not handled in
raw_expression_tree_walker().

Author: Satyanarayana Narlapuram <[email protected]>
Author: Ashutosh Bapat <[email protected]>
Reviewed-by: Robert Haas <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/flat/CAHg%2BQDc97WFTSkXg%3Dg_ZAH8GnY2gJrvq72cs%2BYjqEAuZgXnkAQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc9e7c9ed9389c081f6dd5164b802f8b328f4baf

Modified Files
--------------
src/backend/nodes/nodeFuncs.c             | 31 +++++++++++++++++++++++++++++++
src/test/regress/expected/graph_table.out | 11 +++++++++++
src/test/regress/sql/graph_table.sql      |  5 +++++
3 files changed, 47 insertions(+)

Reply via email to