/* *listofRTEPermissionInfonodesforrtableentriesneedingone
*/
List *permInfos;
/* rtable indexes of target relations for INSERT/UPDATE/DELETE/MERGE */ /* integer list of RT indexes, or NIL */
List *resultRelations;
/* list of AppendRelInfo nodes */
List *appendRelations;
/* *PlantreesforSubPlanexpressions;notethatsomecouldbeNULL
*/
List *subplans;
/* indices of subplans that require REWIND */
Bitmapset *rewindPlanIDs;
/* a list of PlanRowMark's */
List *rowMarks;
/* OIDs of relations the plan depends on */
List *relationOids;
/* other dependencies, as PlanInvalItems */
List *invalItems;
/* type OIDs for PARAM_EXEC Params */
List *paramExecTypes;
/* non-null if this is utility stmt */
Node *utilityStmt;
/* statement location in source string (copied from Query) */ /* start location, or -1 if unknown */
ParseLoc stmt_location; /* length in bytes; 0 means "rest of string" */
ParseLoc stmt_len;
} PlannedStmt;
/* macro for fetching the Plan associated with a SubPlan node */ #define exec_subplan_get_plan(plannedstmt, subplan) \
((Plan *) list_nth((plannedstmt)->subplans, (subplan)->plan_id - 1))
/* *estimatedexecutioncostsforplan(seecostsize.cformoreinfo)
*/ /* count of disabled nodes */ int disabled_nodes; /* cost expended before fetching any tuples */
Cost startup_cost; /* total cost (assuming all tuples fetched) */
Cost total_cost;
/* *planner'sestimateofresultsizeofthisplanstep
*/ /* number of rows plan is expected to emit */
Cardinality plan_rows; /* average row width in bytes */ int plan_width;
/* *informationneededforparallelquery
*/ /* engage parallel-aware logic? */ bool parallel_aware; /* OK to use as part of parallel plan? */ bool parallel_safe;
/* *CommonstructuraldataforallPlantypes.
*/ /* unique across entire final plan tree */ int plan_node_id; /* target list to be computed at this node */
List *targetlist; /* implicitly-ANDed qual conditions */
List *qual; /* input plan tree(s) */ struct Plan *lefttree; struct Plan *righttree; /* Init Plan nodes (un-correlated expr subselects) */
List *initPlan;
/* ---------------- *ModifyTablenode- *Applyrowsproducedbyouterplantoresulttable(s), *byinserting,updating,ordeleting. * *Iftheoriginallynamedtargettableisapartitionedtableorinheritance *tree,bothnominalRelationandrootRelationcontaintheRTindexofthe *partitionrootorappendrelRTE,whichisnototherwisementionedinthe *plan.OtherwiserootRelationiszero.However,nominalRelationwill *alwaysbeset,asit'stherelthatEXPLAINshouldclaimisthe *INSERT/UPDATE/DELETE/MERGEtarget. * *NotethatrowMarksandepqParamarepresumedtobevalidforallthe *table(s);theycan'tcontainanyinfothatvariesacrosstables. *----------------
*/ typedefstruct ModifyTable
{
Plan plan; /* INSERT, UPDATE, DELETE, or MERGE */
CmdType operation; /* do we set the command tag/es_processed? */ bool canSetTag; /* Parent RT index for use of EXPLAIN */
Index nominalRelation; /* Root RT index, if partitioned/inherited */
Index rootRelation; /* some part key in hierarchy updated? */ bool partColsUpdated; /* integer list of RT indexes */
List *resultRelations; /* per-target-table update_colnos lists */
List *updateColnosLists; /* per-target-table WCO lists */
List *withCheckOptionLists; /* alias for OLD in RETURNING lists */ char *returningOldAlias; /* alias for NEW in RETURNING lists */ char *returningNewAlias; /* per-target-table RETURNING tlists */
List *returningLists; /* per-target-table FDW private data lists */
List *fdwPrivLists; /* indices of FDW DM plans */
Bitmapset *fdwDirectModifyPlans; /* PlanRowMarks (non-locking only) */
List *rowMarks; /* ID of Param for EvalPlanQual re-eval */ int epqParam; /* ON CONFLICT action */
OnConflictAction onConflictAction; /* List of ON CONFLICT arbiter index OIDs */
List *arbiterIndexes; /* INSERT ON CONFLICT DO UPDATE targetlist */
List *onConflictSet; /* target column numbers for onConflictSet */
List *onConflictCols; /* WHERE for ON CONFLICT UPDATE */
Node *onConflictWhere; /* RTI of the EXCLUDED pseudo relation */
Index exclRelRTI; /* tlist of the EXCLUDED pseudo relation */
List *exclRelTlist; /* per-target-table lists of actions for MERGE */
List *mergeActionLists; /* per-target-table join conditions for MERGE */
List *mergeJoinConditions;
} ModifyTable;
struct PartitionPruneInfo; /* forward reference to struct below */
/* ---------------- *Appendnode- *Generatetheconcatenationoftheresultsofsub-plans. *----------------
*/ typedefstruct Append
{
Plan plan; /* RTIs of appendrel(s) formed by this node */
Bitmapset *apprelids;
List *appendplans; /* # of asynchronous plans */ int nasyncplans;
/* *All'appendplans'precedingthisindexarenon-partialplans.All *'appendplans'fromthisindexonwardsarepartialplans.
*/ int first_partial_plan;
/* *IndexintoPlannedStmt.partPruneInfosandparallellistsinEState: *es_part_prune_statesandes_part_prune_results.Setto-1ifno *run-timepruningisused.
*/ int part_prune_index;
} Append;
/* ---------------- *tablesamplescannode *----------------
*/ typedefstruct SampleScan
{
Scan scan; /* use struct pointer to avoid including parsenodes.h here */ struct TableSampleClause *tablesample;
} SampleScan;
/* ---------------- *indexscannode * *indexqualorigisanimplicitly-ANDedlistofindexqualexpressions,each *inthesameformitappearedinthequeryWHEREcondition.Eachshould *beoftheform(indexkeyOPcomparisonval)or(comparisonvalOPindexkey). *TheindexkeyisaVarorexpressionreferencingcolumn(s)oftheindex's *basetable.Thecomparisonvalmightbeanyexpression,butitwon'tuse *anycolumnsofthebasetable.Theexpressionsareorderedbyindex *columnposition(butitemsreferencingthesameindexcolumncanappear *inanyorder).indexqualorigisusedatruntimeonlyifwehavetorecheck *alossyindexqual. * *indexqualhasthesameform,buttheexpressionshavebeencommutedif *necessarytoputtheindexkeysontheleft,andtheindexkeysarereplaced *byVarnodesidentifyingtheindexcolumns(theirvarnoisINDEX_VARand *theirvarattnoistheindexcolumnnumber). * *indexorderbyorigissimilarlytheoriginalformofanyORDERBYexpressions *thatarebeingimplementedbytheindex,whileindexorderbyismodifiedto *haveindexcolumnVarsontheleft-handside.Here,multipleexpressions *mustappearinexactlytheORDERBYorder,andthisisnotnecessarilythe *indexcolumnorder.Onlytheexpressionsareprovided,nottheauxiliary *sort-orderinformationfromtheORDERBYSortGroupClauses;it'sassumed *thatthesortorderingisfullydeterminablefromthetop-leveloperators. *indexorderbyorigisusedatruntimetorechecktheordering,iftheindex *cannotcalculateanaccurateordering.ItisalsoneededforEXPLAIN. * *indexorderbyopsisalistoftheOIDsoftheoperatorsusedtosortthe *ORDERBYexpressions.Thisisusedtogetherwithindexorderbyorigto *recheckorderingatruntime.(Notethatindexorderby,indexorderbyorig, *andindexorderbyopsareusedforamcanorderbyopcases,notamcanorder.) * *indexorderdirspecifiesthescanordering,forindexscansonamcanorder *indexes(forotherindexesitshouldbe"don'tcare"). *----------------
*/ typedefstruct IndexScan
{
Scan scan; /* OID of index to scan */
Oid indexid; /* list of index quals (usually OpExprs) */
List *indexqual; /* the same in original form */
List *indexqualorig; /* list of index ORDER BY exprs */
List *indexorderby; /* the same in original form */
List *indexorderbyorig; /* OIDs of sort ops for ORDER BY exprs */
List *indexorderbyops; /* forward or backward or don't care */
ScanDirection indexorderdir;
} IndexScan;
/* ---------------- *index-onlyscannode * *IndexOnlyScanisverysimilartoIndexScan,butitspecifiesan *index-onlyscan,inwhichthedatacomesfromtheindexnottheheap. *Becauseofthis,*all*Varsintheplannode'stargetlist,qual,and *indexexpressionsreferenceindexcolumnsandhavevarno=INDEX_VAR. * *Wecouldalmostuseindexqualdirectlyagainsttheindex'soutputtuple *whenrecheckinglossyindexoperators,butthatwon'tworkforqualson *indexcolumnsthatarenotretrievable.Hence,recheckqualisneeded *forrechecks:itexpressesthesameconditionasindexqual,butusing *onlyindexcolumnsthatareretrievable.(Wewillnotgeneratean *index-onlyscanifthisisnotpossible.Anexampleisthatifan *indexhastablecolumn"x"inaretrievableindexcolumn"ind1",plus *anexpressionf(x)inanon-retrievablecolumn"ind2",anindexable *queryonf(x)willuse"ind2"inindexqualandf(ind1)inrecheckqual. *Withoutthe"ind1"column,anindex-onlyscanwouldbedisallowed.) * *Wedon'tcurrentlyneedarecheckableequivalentofindexorderby, *becausewedon'tsupportlossyoperatorsinindexORDERBY. * *TohelpEXPLAINinterprettheindexVarsfordisplay,weprovide *indextlist,whichrepresentsthecontentsoftheindexasatargetlist *withoneTLEperindexcolumn.Varsappearinginthislistreference *thebasetable,andthisistheonlyfieldintheplannodethatmay *containsuchVars.Also,fortheconvenienceofsetrefs.c,TLEsin *indextlistaremarkedasresjunkiftheycorrespondtocolumnsthat *theindexAMcannotreconstruct. *----------------
*/ typedefstruct IndexOnlyScan
{
Scan scan; /* OID of index to scan */
Oid indexid; /* list of index quals (usually OpExprs) */
List *indexqual; /* index quals in recheckable form */
List *recheckqual; /* list of index ORDER BY exprs */
List *indexorderby; /* TargetEntry list describing index's cols */
List *indextlist; /* forward or backward or don't care */
ScanDirection indexorderdir;
} IndexOnlyScan;
/* ---------------- *bitmapindexscannode * *BitmapIndexScandeliversabitmapofpotentialtuplelocations; *itdoesnotaccesstheheapitself.Thebitmapisusedbyan *ancestorBitmapHeapScannode,possiblyafterpassingthrough *intermediateBitmapAndand/orBitmapOrnodestocombineitwith *theresultsofotherBitmapIndexScans. * *ThefieldshavethesamemeaningsasforIndexScan,exceptwedon't *storeadirectionflagbecausedirectionisuninteresting. * *InaBitmapIndexScanplannode,thetargetlistandqualfieldsare *notusedandarealwaysNIL.Theindexqualorigfieldisunusedat *runtimetoo,butissavedforthebenefitofEXPLAIN. *----------------
*/ typedefstruct BitmapIndexScan
{
Scan scan; /* OID of index to scan */
Oid indexid; /* Create shared bitmap if set */ bool isshared; /* list of index quals (OpExprs) */
List *indexqual; /* the same in original form */
List *indexqualorig;
} BitmapIndexScan;
/* ---------------- *bitmapsequentialscannode * *Thisneedsacopyofthequalconditionsbeingusedbytheinputindex *scansbecausetherearevariouscaseswhereweneedtorecheckthequals; *forexample,whenthebitmapislossyaboutthespecificrowsonapage *thatmeettheindexcondition. *----------------
*/ typedefstruct BitmapHeapScan
{
Scan scan; /* index quals, in standard expr form */
List *bitmapqualorig;
} BitmapHeapScan;
/* ---------------- *CteScannode *----------------
*/ typedefstruct CteScan
{
Scan scan; /* ID of init SubPlan for CTE */ int ctePlanId; /* ID of Param representing CTE output */ int cteParam;
} CteScan;
/* ---------------- *NamedTuplestoreScannode *----------------
*/ typedefstruct NamedTuplestoreScan
{
Scan scan; /* Name given to Ephemeral Named Relation */ char *enrname;
} NamedTuplestoreScan;
/* ---------------- *WorkTableScannode *----------------
*/ typedefstruct WorkTableScan
{
Scan scan; /* ID of Param representing work table */ int wtParam;
} WorkTableScan;
/* ---------------- *ForeignScannode * *fdw_exprsandfdw_privatearebothunderthecontroloftheforeign-data *wrapper,butfdw_exprsispresumedtocontainexpressiontreesandwill *bepost-processedaccordinglybytheplanner;fdw_privatewon'tbe. *NotethateverythinginbothlistsmustbecopiablebycopyObject(). *Onewaytostoreanarbitraryblobofbytesistorepresentitasabytea *Const.Usually,though,you'llbebetteroffchoosingarepresentation *thatcanbedumpedusefullybynodeToString(). * *fdw_scan_tlistisatargetlistdescribingthecontentsofthescantuple *returnedbytheFDW;itcanbeNILifthescantuplematchesthedeclared *rowtypeoftheforeigntable,whichisthenormalcaseforasimpleforeign *tablescan.(Iftheplannoderepresentsaforeignjoin,fdw_scan_tlist *isrequiredsincethereisnorowtypeavailablefromthesystemcatalogs.) *Whenfdw_scan_tlistisprovided,Varsinthenode'stlistandqualsmust *havevarnoINDEX_VAR,andtheirvarattnoscorrespondtoresnosinthe *fdw_scan_tlist(whicharealsocolumnnumbersintheactualscantuple). *fdw_scan_tlistisneveractuallyexecuted;itjustholdsexpressiontrees *describingwhatisinthescantuple'scolumns. * *fdw_recheck_qualsshouldcontainanyqualswhichthecoresystempassedto *theFDWbutwhichwerenotaddedtoscan.plan.qual;thatis,itshould *containthequalsbeingcheckedremotely.Thisisneededforcorrect *behaviorduringEvalPlanQualrechecks. * *Whentheplannoderepresentsaforeignjoin,scan.scanrelidiszeroand *fs_relidsmustbeconsultedtoidentifythejoinrelation.(fs_relids *isvalidforsimplescansaswell,butwillalwaysmatchscan.scanrelid.) *fs_relidsincludesouterjoins;fs_base_relidsdoesnot. * *IftheFDW'sPlanDirectModify()callbackdecidestorepurposeaForeignScan *nodetoperformtheUPDATEorDELETEoperationdirectlyintheremote *server,itsets'operation'and'resultRelation'toidentifytheoperation *typeandtargetrelation.Notethatthesefieldsareonlysetifthe *modificationisperformed*fully*remotely;otherwise,themodificationis *drivenbyalocalModifyTablenodeand'operation'islefttoCMD_SELECT. *----------------
*/ typedefstruct ForeignScan
{
Scan scan; /* SELECT/INSERT/UPDATE/DELETE */
CmdType operation; /* direct modification target's RT index */
Index resultRelation; /* user to perform the scan as; 0 means to check as current user */
Oid checkAsUser; /* OID of foreign server */
Oid fs_server; /* expressions that FDW may evaluate */
List *fdw_exprs; /* private data for FDW */
List *fdw_private; /* optional tlist describing scan tuple */
List *fdw_scan_tlist; /* original quals not in scan.plan.qual */
List *fdw_recheck_quals; /* base+OJ RTIs generated by this scan */
Bitmapset *fs_relids; /* base RTIs generated by this scan */
Bitmapset *fs_base_relids; /* true if any "system column" is needed */ bool fsSystemCol;
} ForeignScan;
typedefstruct CustomScan
{
Scan scan; /* mask of CUSTOMPATH_* flags, see nodes/extensible.h */
uint32 flags; /* list of Plan nodes, if any */
List *custom_plans; /* expressions that custom code may evaluate */
List *custom_exprs; /* private data for custom code */
List *custom_private; /* optional tlist describing scan tuple */
List *custom_scan_tlist; /* RTIs generated by this scan */
Bitmapset *custom_relids;
/* ---------------- *incrementalsortnode *----------------
*/ typedefstruct IncrementalSort
{
Sort sort; /* number of presorted columns */ int nPresortedCols;
} IncrementalSort;
/* --------------- *groupnode- *UsedforquerieswithGROUPBY(butnoaggregates)specified. *Theinputmustbepresortedaccordingtothegroupingcolumns. *---------------
*/ typedefstruct Group
{
Plan plan;
/* number of grouping columns */ int numCols;
/* their indexes in the target list */
AttrNumber *grpColIdx pg_node_attr(array_size(numCols));
/* equality operators to compare with */
Oid *grpOperators pg_node_attr(array_size(numCols));
Oid *grpCollations pg_node_attr(array_size(numCols));
} Group;
/* ---------------- *uniquenode *----------------
*/ typedefstruct Unique
{
Plan plan;
/* number of columns to check for uniqueness */ int numCols;
/* their indexes in the target list */
AttrNumber *uniqColIdx pg_node_attr(array_size(numCols));
/* equality operators to compare with */
Oid *uniqOperators pg_node_attr(array_size(numCols));
/* collations for equality comparisons */
Oid *uniqCollations pg_node_attr(array_size(numCols));
} Unique;
/* ------------ *gathernode * *Note:rescan_paramistheIDofaPARAM_EXECparameterslot.Thatslot *willneveractuallycontainavalue,buttheGathernodemustflagitas *havingchangedwheneveritisrescanned.Thechildparallel-awarescan *nodesaremarkedasdependingonthatparameter,sothattherescan *machineryisawarethattheiroutputislikelytochangeacrossrescans. *Insomecaseswedon'tneedarescanParam,sorescan_paramissetto-1. *------------
*/ typedefstruct Gather
{
Plan plan; /* planned number of worker processes */ int num_workers; /* ID of Param that signals a rescan, or -1 */ int rescan_param; /* don't execute plan more than once */ bool single_copy; /* suppress EXPLAIN display (for testing)? */ bool invisible;
/* *ListofexpressionstobehashedfortuplesfromHash'souterplan, *neededtoputthemintothehashtable.
*/ /* hash keys for the hashjoin condition */
List *hashkeys; /* outer join key's table OID, or InvalidOid */
Oid skewTable; /* outer join key's column #, or zero */
AttrNumber skewColumn; /* is outer join rel an inheritance tree? */ bool skewInherit; /* all other info is in the parent HashJoin node */ /* estimate total rows if parallel_aware */
Cardinality rows_total;
} Hash;
/* ---------------- *setopnode *----------------
*/ typedefstruct SetOp
{
Plan plan;
/* what to do, see nodes.h */
SetOpCmd cmd;
/* how to do it, see nodes.h */
SetOpStrategy strategy;
/* number of columns to compare */ int numCols;
/* their indexes in the target list */
AttrNumber *cmpColIdx pg_node_attr(array_size(numCols));
/* comparison operators (either equality operators or sort operators) */
Oid *cmpOperators pg_node_attr(array_size(numCols));
Oid *cmpCollations pg_node_attr(array_size(numCols));
/* nulls-first flags if sorting, otherwise not interesting */ bool *cmpNullsFirst pg_node_attr(array_size(numCols));
/* estimated number of groups in left input */ long numGroups;
} SetOp;
/* ---------------- *lock-rowsnode * *rowMarksidentifiestherelstobelockedbythisnode;itshouldbe *asubsetoftherowMarkslistedinthetop-levelPlannedStmt. *epqParamisaParamthatallscannodesbelowthisonemustdependon. *Itisusedtoforcere-evaluationoftheplanduringEvalPlanQual. *----------------
*/ typedefstruct LockRows
{
Plan plan; /* a list of PlanRowMark's */
List *rowMarks; /* ID of Param for EvalPlanQual re-eval */ int epqParam;
} LockRows;
NodeTag type; /* range table index of markable relation */
Index rti; /* range table index of parent relation */
Index prti; /* unique identifier for resjunk columns */
Index rowmarkId; /* see enum above */
RowMarkType markType; /* OR of (1<<markType) for all children */ int allMarkTypes; /* LockingClause's strength, or LCS_NONE */
LockClauseStrength strength; /* NOWAIT and SKIP LOCKED options */
LockWaitPolicy waitPolicy; /* true if this is a "dummy" parent entry */ bool isParent;
} PlanRowMark;
/* RT index of partition rel for this level */
Index rtindex;
/* Indexes of all partitions which subplans or subparts are present for */
Bitmapset *present_parts;
/* Length of the following arrays: */ int nparts;
/* subplan index by partition index, or -1 */ int *subplan_map pg_node_attr(array_size(nparts));
/* subpart index by partition index, or -1 */ int *subpart_map pg_node_attr(array_size(nparts));
/* RT index by partition index, or 0 */ int *leafpart_rti_map pg_node_attr(array_size(nparts));
/* relation OID by partition index, or 0 */
Oid *relid_map pg_node_attr(array_size(nparts));
/* *initial_pruning_stepsshowshowtopruneduringexecutorstartup(i.e., *withoutuseofanyPARAM_EXECParams);itisNILifnostartuppruning *isrequired.exec_pruning_stepsshowshowtoprunewithPARAM_EXEC *Params;itisNILifnoper-scanpruningisrequired.
*/ /* List of PartitionPruneStep */
List *initial_pruning_steps; /* List of PartitionPruneStep */
List *exec_pruning_steps;
/* All PARAM_EXEC Param IDs in exec_pruning_steps */
Bitmapset *execparamids;
} PartitionedRelPruneInfo;
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.49Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-08-06)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.