PostgreSQL Source Code git master
Loading...
Searching...
No Matches
rewriteGraphTable.h File Reference
#include "nodes/parsenodes.h"
Include dependency graph for rewriteGraphTable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

QueryrewriteGraphTable (Query *parsetree, int rt_index)
 

Function Documentation

◆ rewriteGraphTable()

Query * rewriteGraphTable ( Query parsetree,
int  rt_index 
)
extern

Definition at line 110 of file rewriteGraphTable.c.

111{
116
117 rte = rt_fetch(rt_index, parsetree->rtable);
118
119 Assert(list_length(rte->graph_pattern->path_pattern_list) == 1);
120
121 path_pattern = linitial(rte->graph_pattern->path_pattern_list);
124
126
127 rte->rtekind = RTE_SUBQUERY;
128 rte->subquery = graph_table_query;
129 rte->lateral = true;
130
131 /*
132 * Reset no longer applicable fields, to appease
133 * WRITE_READ_PARSE_PLAN_TREES.
134 */
135 rte->graph_pattern = NULL;
136 rte->graph_table_columns = NIL;
137
138 return parsetree;
139}
#define Assert(condition)
Definition c.h:942
@ RTE_SUBQUERY
#define rt_fetch(rangetable_index, rangetable)
Definition parsetree.h:31
static int list_length(const List *l)
Definition pg_list.h:152
#define NIL
Definition pg_list.h:68
#define linitial(l)
Definition pg_list.h:178
static int fb(int x)
static Query * generate_union_from_pathqueries(List **pathqueries)
static List * generate_queries_for_path_pattern(RangeTblEntry *rte, List *element_patterns)
void AcquireRewriteLocks(Query *parsetree, bool forExecute, bool forUpdatePushedDown)
Definition pg_list.h:54
List * rtable
Definition parsenodes.h:175

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().