|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/genam.h"#include "access/sysattr.h"#include "access/table.h"#include "access/htup_details.h"#include "catalog/pg_operator.h"#include "catalog/pg_propgraph_element.h"#include "catalog/pg_propgraph_element_label.h"#include "catalog/pg_propgraph_label.h"#include "catalog/pg_propgraph_label_property.h"#include "catalog/pg_propgraph_property.h"#include "nodes/makefuncs.h"#include "nodes/nodeFuncs.h"#include "optimizer/optimizer.h"#include "parser/analyze.h"#include "parser/parse_collate.h"#include "parser/parse_func.h"#include "parser/parse_node.h"#include "parser/parse_oper.h"#include "parser/parse_relation.h"#include "parser/parsetree.h"#include "parser/parse_graphtable.h"#include "rewrite/rewriteGraphTable.h"#include "rewrite/rewriteHandler.h"#include "rewrite/rewriteManip.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/lsyscache.h"#include "utils/ruleutils.h"#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
| struct | path_factor |
| struct | path_element |
| struct | replace_property_refs_context |
|
static |
Definition at line 1147 of file rewriteGraphTable.c.
References Assert, assign_expr_collations(), DatumGetArrayTypeP, DatumGetInt16(), DatumGetObjectId(), deconstruct_array_builtin(), elog, ERROR, exprType(), fb(), Form_pg_operator, Form_pg_propgraph_element, get_atttypetypmodcoll(), get_func_retset(), GETSTRUCT(), GetSysCacheOid1, HeapTupleIsValid, i, lappend(), list_make2, make_fn_arguments(), make_parsestate(), makeNode, makeVar(), NIL, ObjectIdGetDatum(), RegProcedureIsValid, ReleaseSysCache(), SearchSysCache1(), and SysCacheGetAttrNotNull().
Referenced by create_pe_for_element().
|
static |
Definition at line 745 of file rewriteGraphTable.c.
References Assert, build_edge_vertex_link_quals(), path_element::elemoid, elog, ERROR, fb(), Form_pg_propgraph_element, GETSTRUCT(), IS_EDGE_PATTERN, ObjectIdGetDatum(), palloc0_object, ReleaseSysCache(), SearchSysCache1(), and VERTEX_PATTERN.
Referenced by get_path_elements_for_path_factor().
|
static |
Definition at line 175 of file rewriteGraphTable.c.
References AND_EXPR, Assert, EDGE_PATTERN_ANY, EDGE_PATTERN_LEFT, EDGE_PATTERN_RIGHT, equal(), ereport, errcode(), errmsg, ERROR, path_factor::factorpos, fb(), foreach_node, foreach_ptr, generate_queries_for_path_pattern_recurse(), generate_query_for_empty_path_pattern(), get_path_elements_for_path_factor(), IS_EDGE_PATTERN, lappend(), list_length(), list_make1, list_make2, makeBoolExpr(), NIL, palloc0_object, and VERTEX_PATTERN.
Referenced by rewriteGraphTable().
|
static |
Definition at line 353 of file rewriteGraphTable.c.
References Assert, fb(), foreach_ptr, generate_queries_for_path_pattern_recurse(), generate_query_for_graph_path(), lappend(), list_delete_last(), list_length(), and list_nth_node.
Referenced by generate_queries_for_path_pattern(), and generate_queries_for_path_pattern_recurse().
|
static |
Definition at line 571 of file rewriteGraphTable.c.
References CMD_SELECT, Query::commandType, exprCollation(), exprType(), exprTypmod(), fb(), foreach_node, Query::jointree, lappend(), makeBoolConst(), makeFromExpr(), makeNode, makeNullConst(), NIL, Query::rtable, and Query::targetList.
Referenced by generate_queries_for_path_pattern().
|
static |
Definition at line 408 of file rewriteGraphTable.c.
References AccessShareLock, addRangeTableEntryForRelation(), AND_EXPR, Assert, bms_add_member(), castNode, ChangeVarNodes(), CMD_SELECT, copyObject, path_element::dest_quals, EDGE_PATTERN_ANY, fb(), FirstLowInvalidHeapAttributeNumber, foreach_node, foreach_ptr, getRTEPermissionInfo(), IS_EDGE_PATTERN, lappend(), list_concat(), list_length(), list_make1, list_make2, list_nth(), make_parsestate(), makeBoolExpr(), makeFromExpr(), makeNode, NIL, NoLock, OR_EXPR, pull_vars_of_level(), replace_property_refs(), rt_fetch, path_element::src_quals, table_close(), table_open(), and VERTEX_PATTERN.
Referenced by generate_queries_for_path_pattern_recurse().
|
static |
Definition at line 685 of file rewriteGraphTable.c.
References addRangeTableEntryForSubquery(), constructSetOpTargetlist(), fb(), foreach_node, generate_setop_from_pathqueries(), lappend(), linitial_node, list_delete_first(), list_length(), make_parsestate(), makeNode, NIL, and SETOP_UNION.
Referenced by generate_setop_from_pathqueries(), and generate_union_from_pathqueries().
Definition at line 609 of file rewriteGraphTable.c.
References Assert, castNode, CMD_SELECT, exprLocation(), fb(), forfour, generate_setop_from_pathqueries(), lappend(), lfirst, lfirst_int, lfirst_oid, linitial_node, list_length(), Var::location, makeFromExpr(), makeNode, makeTargetEntry(), makeVar(), NIL, pstrdup(), and rt_fetch.
Referenced by rewriteGraphTable().
Definition at line 1283 of file rewriteGraphTable.c.
References BTEqualStrategyNumber, ChangeVarNodes(), fb(), Form_pg_propgraph_element_label, GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), RowShareLock, ScanKeyInit(), SearchSysCache2(), stringToNode(), SysCacheGetAttrNotNull(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), and TextDatumGetCString.
Referenced by replace_property_refs_mutator().
Definition at line 808 of file rewriteGraphTable.c.
References AccessShareLock, BTEqualStrategyNumber, castNode, elog, ERROR, fb(), foreach_node, Form_pg_propgraph_label, GETSTRUCT(), HeapTupleIsValid, IsA, label, lappend_oid(), list_make1_oid, NIL, nodeTag, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by get_path_elements_for_path_factor().
|
static |
Definition at line 886 of file rewriteGraphTable.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, create_pe_for_element(), ereport, errcode(), errmsg, ERROR, fb(), foreach_oid, Form_pg_propgraph_element_label, get_labels_for_expr(), get_propgraph_label_name(), get_rel_name(), GETSTRUCT(), HeapTupleIsValid, IS_EDGE_PATTERN, lappend(), lappend_oid(), list_difference_oid(), list_member_oid(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), and VERTEX_PATTERN.
Referenced by generate_queries_for_path_pattern().
Definition at line 1248 of file rewriteGraphTable.c.
References BTEqualStrategyNumber, fb(), Form_pg_propgraph_element_label, GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), RowShareLock, ScanKeyInit(), SearchSysCacheExists2, systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by replace_property_refs_mutator().
Definition at line 1133 of file rewriteGraphTable.c.
References expression_tree_mutator, replace_property_refs_context::mappings, replace_property_refs_context::propgraphid, and replace_property_refs_mutator().
Referenced by generate_query_for_graph_path().
|
static |
Definition at line 1001 of file rewriteGraphTable.c.
References Assert, ChangeVarNodes(), copyObject, ereport, errcode(), errmsg, ERROR, expression_tree_mutator, fb(), foreach_oid, foreach_ptr, get_element_property_expr(), get_propgraph_property_name(), GetSysCacheOid2, is_property_associated_with_label(), IsA, lappend_oid(), makeNullConst(), replace_property_refs_context::mappings, NIL, ObjectIdGetDatum(), OidIsValid, ReleaseSysCache(), replace_property_refs_mutator(), SearchSysCache2(), stringToNode(), SysCacheGetAttrNotNull(), and TextDatumGetCString.
Referenced by replace_property_refs(), and replace_property_refs_mutator().
Definition at line 110 of file rewriteGraphTable.c.
References AcquireRewriteLocks(), Assert, fb(), generate_queries_for_path_pattern(), generate_union_from_pathqueries(), linitial, list_length(), NIL, rt_fetch, Query::rtable, and RTE_SUBQUERY.
Referenced by fireRIRrules().