PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/pg_operator_d.h"
#include "catalog/pg_type_d.h"
#include "nodes/makefuncs.h"
#include "nodes/pg_list.h"
#include "nodes/parsenodes.h"
#include "nodes/primnodes.h"
#include "parser/analyze.h"
#include "parser/parsetree.h"
#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteSearchCycle.h"
#include "utils/fmgroids.h"
Go to the source code of this file.
Functions | |
static RowExpr * | make_path_rowexpr (const CommonTableExpr *cte, const List *col_list) |
static Expr * | make_path_initial_array (RowExpr *rowexpr) |
static Expr * | make_path_cat_expr (RowExpr *rowexpr, AttrNumber path_varattno) |
CommonTableExpr * | rewriteSearchAndCycle (CommonTableExpr *cte) |
|
static |
Definition at line 180 of file rewriteSearchCycle.c.
References COERCE_EXPLICIT_CALL, ArrayExpr::elements, InvalidOid, list_make1, list_make2, ArrayExpr::location, makeFuncExpr(), makeNode, and makeVar().
Referenced by rewriteSearchAndCycle().
Definition at line 159 of file rewriteSearchCycle.c.
References ArrayExpr::elements, list_make1, ArrayExpr::location, and makeNode.
Referenced by rewriteSearchAndCycle().
|
static |
Definition at line 117 of file rewriteSearchCycle.c.
References RowExpr::args, COERCE_IMPLICIT_CAST, i, lappend(), lfirst, list_length(), list_nth(), list_nth_int(), list_nth_oid(), RowExpr::location, makeNode, makeString(), makeVar(), and strVal.
Referenced by rewriteSearchAndCycle().
CommonTableExpr* rewriteSearchAndCycle | ( | CommonTableExpr * | cte | ) |
Definition at line 203 of file rewriteSearchCycle.c.
References RangeTblEntry::alias, SetOperationStmt::all, FieldSelect::arg, ScalarArrayOpExpr::args, CaseExpr::args, RowExpr::args, Assert(), castNode, CMD_SELECT, COERCE_EXPLICIT_CALL, Alias::colnames, Query::commandType, copyObject, CommonTableExpr::ctename, CommonTableExpr::ctequery, CaseExpr::defresult, RangeTblEntry::eref, ereport, errcode(), errmsg(), ERROR, CaseWhen::expr, FieldSelect::fieldnum, FLOAT8PASSBYVAL, i, IncrementVarSublevelsUp(), RangeTblEntry::inFromCl, Int64GetDatum(), InvalidAttrNumber, InvalidOid, Query::jointree, lappend(), lappend_int(), lappend_oid(), SetOperationStmt::larg, lcons(), linitial, list_length(), list_make1, list_make2, list_nth(), list_nth_int(), list_nth_node, list_nth_oid(), ScalarArrayOpExpr::location, CaseExpr::location, CaseWhen::location, make_opclause(), make_path_cat_expr(), make_path_initial_array(), make_path_rowexpr(), makeAlias(), makeConst(), makeFromExpr(), makeFuncExpr(), makeNode, makeSortGroupClauseForSetOp(), makeString(), makeTargetEntry(), makeVar(), SetOperationStmt::op, ScalarArrayOpExpr::opno, SetOperationStmt::rarg, CaseWhen::result, rt_fetch, Query::rtable, RTE_CTE, RTE_SUBQUERY, RangeTblEntry::rtekind, RangeTblRef::rtindex, SETOP_UNION, Query::setOperations, strVal, RangeTblEntry::subquery, Query::targetList, and ScalarArrayOpExpr::useOr.
Referenced by fireRIRrules().