PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/sysattr.h"
#include "nodes/makefuncs.h"
#include "parser/analyze.h"
#include "parser/parse_clause.h"
#include "parser/parse_collate.h"
#include "parser/parse_cte.h"
#include "parser/parse_expr.h"
#include "parser/parse_merge.h"
#include "parser/parse_relation.h"
#include "parser/parse_target.h"
#include "parser/parsetree.h"
#include "utils/rel.h"
Go to the source code of this file.
Functions | |
static void | setNamespaceForMergeWhen (ParseState *pstate, MergeWhenClause *mergeWhenClause, Index targetRTI, Index sourceRTI) |
static void | setNamespaceVisibilityForRTE (List *namespace, RangeTblEntry *rte, bool rel_visible, bool cols_visible) |
Query * | transformMergeStmt (ParseState *pstate, MergeStmt *stmt) |
|
static |
Definition at line 52 of file parse_merge.c.
References Assert, CMD_DELETE, CMD_INSERT, CMD_NOTHING, CMD_UPDATE, MergeWhenClause::commandType, MergeWhenClause::matchKind, MERGE_WHEN_MATCHED, MERGE_WHEN_NOT_MATCHED_BY_SOURCE, ParseState::p_namespace, ParseState::p_rtable, rt_fetch, and setNamespaceVisibilityForRTE().
Referenced by transformMergeStmt().
|
static |
Definition at line 415 of file parse_merge.c.
References lfirst, ParseNamespaceItem::p_cols_visible, ParseNamespaceItem::p_rel_visible, and ParseNamespaceItem::p_rte.
Referenced by setNamespaceForMergeWhen().
Query* transformMergeStmt | ( | ParseState * | pstate, |
MergeStmt * | stmt | ||
) |
Definition at line 107 of file parse_merge.c.
References ACL_DELETE, ACL_INSERT, ACL_NO_RIGHTS, ACL_SELECT, ACL_UPDATE, generate_unaccent_rules::action, addNSItemToQuery(), Alias::aliasname, Assert, assign_query_collations(), bms_add_member(), checkInsertTargets(), CMD_DELETE, CMD_INSERT, CMD_MERGE, CMD_NOTHING, CMD_UPDATE, Query::commandType, MergeWhenClause::commandType, MergeWhenClause::condition, Query::cteList, elog, ereport, errcode(), errdetail(), errdetail_relkind_not_supported(), errmsg(), ERROR, EXPR_KIND_JOIN_ON, EXPR_KIND_MERGE_RETURNING, EXPR_KIND_MERGE_WHEN, EXPR_KIND_VALUES_SINGLE, FirstLowInvalidHeapAttributeNumber, forthree, GetNSItemByRangeTablePosn(), RTEPermissionInfo::insertedCols, Query::jointree, lappend(), lfirst, lfirst_int, lfirst_node, list_length(), list_make1, makeFromExpr(), makeNode, makeTargetEntry(), MergeWhenClause::matchKind, MERGE_WHEN_MATCHED, MERGE_WHEN_NOT_MATCHED_BY_SOURCE, MERGE_WHEN_NOT_MATCHED_BY_TARGET, Query::mergeActionList, Query::mergeJoinCondition, ResTarget::name, NIL, NUM_MERGE_MATCH_KINDS, MergeWhenClause::override, ParseState::p_ctenamespace, ParseState::p_hasModifyingCTE, ParseState::p_hasSubLinks, ParseState::p_is_insert, ParseState::p_joinlist, ParseNamespaceItem::p_names, ParseNamespaceItem::p_perminfo, ParseState::p_rtable, ParseState::p_rteperminfos, ParseState::p_target_nsitem, ParseState::p_target_relation, RelationData::rd_rel, RelationGetRelationName, Query::returningList, Query::rtable, setNamespaceForMergeWhen(), setTargetTable(), stmt, Query::targetList, MergeWhenClause::targetList, transformExpr(), transformExpressionList(), transformFromClause(), transformInsertRow(), transformReturningList(), transformUpdateTargetList(), transformWhereClause(), transformWithClause(), and MergeWhenClause::values.
Referenced by transformStmt().