diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
| -rw-r--r-- | src/include/commands/trigger.h | 6 | ||||
| -rw-r--r-- | src/include/executor/executor.h | 32 | ||||
| -rw-r--r-- | src/include/nodes/execnodes.h | 58 | ||||
| -rw-r--r-- | src/include/nodes/nodes.h | 5 | ||||
| -rw-r--r-- | src/include/nodes/parsenodes.h | 21 | ||||
| -rw-r--r-- | src/include/nodes/plannodes.h | 68 | ||||
| -rw-r--r-- | src/include/nodes/relation.h | 10 | ||||
| -rw-r--r-- | src/include/optimizer/planmain.h | 7 | ||||
| -rw-r--r-- | src/include/optimizer/prep.h | 4 | ||||
| -rw-r--r-- | src/include/optimizer/subselect.h | 4 | ||||
| -rw-r--r-- | src/include/parser/parsetree.h | 4 |
12 files changed, 159 insertions, 64 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index ea053041bf..aa9348a336 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.546 2009/10/14 22:14:24 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.547 2009/10/26 02:26:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200910141 +#define CATALOG_VERSION_NO 200910251 #endif diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index 94cb061959..2bf40b76af 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.76 2009/10/10 01:43:50 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.77 2009/10/26 02:26:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -139,7 +139,7 @@ extern void ExecBSDeleteTriggers(EState *estate, extern void ExecASDeleteTriggers(EState *estate, ResultRelInfo *relinfo); extern bool ExecBRDeleteTriggers(EState *estate, - PlanState *subplanstate, + EPQState *epqstate, ResultRelInfo *relinfo, ItemPointer tupleid); extern void ExecARDeleteTriggers(EState *estate, @@ -150,7 +150,7 @@ extern void ExecBSUpdateTriggers(EState *estate, extern void ExecASUpdateTriggers(EState *estate, ResultRelInfo *relinfo); extern HeapTuple ExecBRUpdateTriggers(EState *estate, - PlanState *subplanstate, + EPQState *epqstate, ResultRelInfo *relinfo, ItemPointer tupleid, HeapTuple newtuple); diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 36e7d35467..ba2f42d686 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.162 2009/10/12 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.163 2009/10/26 02:26:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -166,16 +166,23 @@ extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid); extern bool ExecContextForcesOids(PlanState *planstate, bool *hasoids); extern void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate); -extern TupleTableSlot *EvalPlanQual(EState *estate, Index rti, - PlanState *subplanstate, +extern TupleTableSlot *EvalPlanQual(EState *estate, EPQState *epqstate, + Relation relation, Index rti, ItemPointer tid, TransactionId priorXmax); -extern HeapTuple EvalPlanQualFetch(EState *estate, Index rti, - ItemPointer tid, TransactionId priorXmax); -extern void EvalPlanQualPush(EState *estate, Index rti, - PlanState *subplanstate); -extern void EvalPlanQualSetTuple(EState *estate, Index rti, HeapTuple tuple); -extern TupleTableSlot *EvalPlanQualNext(EState *estate); -extern void EvalPlanQualPop(EState *estate, PlanState *subplanstate); +extern HeapTuple EvalPlanQualFetch(EState *estate, Relation relation, + int lockmode, ItemPointer tid, TransactionId priorXmax); +extern void EvalPlanQualInit(EPQState *epqstate, EState *estate, + Plan *subplan, int epqParam); +extern void EvalPlanQualSetPlan(EPQState *epqstate, Plan *subplan); +extern void EvalPlanQualAddRowMark(EPQState *epqstate, ExecRowMark *erm); +extern void EvalPlanQualSetTuple(EPQState *epqstate, Index rti, + HeapTuple tuple); +extern HeapTuple EvalPlanQualGetTuple(EPQState *epqstate, Index rti); +#define EvalPlanQualSetSlot(epqstate, slot) ((epqstate)->origslot = (slot)) +extern void EvalPlanQualFetchRowMarks(EPQState *epqstate); +extern TupleTableSlot *EvalPlanQualNext(EPQState *epqstate); +extern void EvalPlanQualBegin(EPQState *epqstate, EState *parentestate); +extern void EvalPlanQualEnd(EPQState *epqstate); extern DestReceiver *CreateIntoRelDestReceiver(void); /* @@ -211,9 +218,12 @@ extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo, * prototypes from functions in execScan.c */ typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node); +typedef bool (*ExecScanRecheckMtd) (ScanState *node, TupleTableSlot *slot); -extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd); +extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, + ExecScanRecheckMtd recheckMtd); extern void ExecAssignScanProjectionInfo(ScanState *node); +extern void ExecScanReScan(ScanState *node); /* * prototypes from functions in execTuples.c diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 93d4aa00db..bba9c0370b 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.210 2009/10/12 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.211 2009/10/26 02:26:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -331,6 +331,7 @@ typedef struct EState Snapshot es_snapshot; /* time qual to use */ Snapshot es_crosscheck_snapshot; /* crosscheck time qual for RI */ List *es_range_table; /* List of RangeTblEntry */ + PlannedStmt *es_plannedstmt; /* link to top of plan tree */ JunkFilter *es_junkFilter; /* top-level junk filter, if any */ @@ -375,31 +376,45 @@ typedef struct EState */ ExprContext *es_per_tuple_exprcontext; - /* Below is to re-evaluate plan qual in READ COMMITTED mode */ - PlannedStmt *es_plannedstmt; /* link to top of plan tree */ - struct evalPlanQual *es_evalPlanQual; /* chain of PlanQual states */ - bool *es_evTupleNull; /* local array of EPQ status */ - HeapTuple *es_evTuple; /* shared array of EPQ substitute tuples */ + /* + * These fields are for re-evaluating plan quals when an updated tuple is + * substituted in READ COMMITTED mode. es_epqTuple[] contains tuples + * that scan plan nodes should return instead of whatever they'd normally + * return, or NULL if nothing to return; es_epqTupleSet[] is true if a + * particular array entry is valid; and es_epqScanDone[] is state to + * remember if the tuple has been returned already. Arrays are of size + * list_length(es_range_table) and are indexed by scan node scanrelid - 1. + */ + HeapTuple *es_epqTuple; /* array of EPQ substitute tuples */ + bool *es_epqTupleSet; /* true if EPQ tuple is provided */ + bool *es_epqScanDone; /* true if EPQ tuple has been fetched */ } EState; /* + * ExecRowMark - + * runtime representation of FOR UPDATE/SHARE clauses + * + * When doing UPDATE, DELETE, or SELECT FOR UPDATE/SHARE, we should have an + * ExecRowMark for each non-target relation in the query (except inheritance + * parent RTEs, which can be ignored at runtime). See PlanRowMark for details + * about most of the fields. + * * es_rowMarks is a list of these structs. Each LockRows node has its own * list, which is the subset of locks that it is supposed to enforce; note * that the per-node lists point to the same structs that are in the global - * list. See RowMarkClause for details about rti, prti, and rowmarkId. - * toidAttno is not used in a "plain" (non-inherited) rowmark. + * list. */ typedef struct ExecRowMark { - Relation relation; /* opened and RowShareLock'd relation */ + Relation relation; /* opened and suitably locked relation */ Index rti; /* its range table index */ Index prti; /* parent range table index, if child */ - Index rowmarkId; /* unique identifier assigned by planner */ - bool forUpdate; /* true = FOR UPDATE, false = FOR SHARE */ + RowMarkType markType; /* see enum in nodes/plannodes.h */ bool noWait; /* NOWAIT option */ - AttrNumber ctidAttNo; /* resno of its ctid junk attribute */ + AttrNumber ctidAttNo; /* resno of ctid junk attribute, if any */ AttrNumber toidAttNo; /* resno of tableoid junk attribute, if any */ + AttrNumber wholeAttNo; /* resno of whole-row junk attribute, if any */ ItemPointerData curCtid; /* ctid of currently locked tuple, if any */ } ExecRowMark; @@ -967,6 +982,21 @@ typedef struct PlanState #define innerPlanState(node) (((PlanState *)(node))->righttree) #define outerPlanState(node) (((PlanState *)(node))->lefttree) +/* + * EPQState is state for executing an EvalPlanQual recheck on a candidate + * tuple in ModifyTable or LockRows. The estate and planstate fields are + * NULL if inactive. + */ +typedef struct EPQState +{ + EState *estate; /* subsidiary EState */ + PlanState *planstate; /* plan state tree ready to be executed */ + TupleTableSlot *origslot; /* original output tuple to be rechecked */ + Plan *plan; /* plan tree to be executed */ + List *rowMarks; /* ExecRowMarks (non-locking only) */ + int epqParam; /* ID of Param to force scan node re-eval */ +} EPQState; + /* ---------------- * ResultState information @@ -991,6 +1021,7 @@ typedef struct ModifyTableState PlanState **mt_plans; /* subplans (one per target rel) */ int mt_nplans; /* number of plans in the array */ int mt_whichplan; /* which one is being executed (0..n-1) */ + EPQState mt_epqstate; /* for evaluating EvalPlanQual rechecks */ bool fireBSTriggers; /* do we need to fire stmt triggers? */ } ModifyTableState; @@ -1651,8 +1682,7 @@ typedef struct LockRowsState { PlanState ps; /* its first field is NodeTag */ List *lr_rowMarks; /* List of ExecRowMarks */ - JunkFilter *lr_junkFilter; /* needed for getting ctid columns */ - bool lr_useEvalPlan; /* evaluating EPQ tuples? */ + EPQState lr_epqstate; /* for evaluating EvalPlanQual rechecks */ } LockRowsState; /* ---------------- diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index c452d53505..f26f5d8d11 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.230 2009/10/12 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.231 2009/10/26 02:26:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -73,7 +73,8 @@ typedef enum NodeTag T_SetOp, T_LockRows, T_Limit, - /* this one isn't a subclass of Plan: */ + /* these aren't subclasses of Plan: */ + T_PlanRowMark, T_PlanInvalItem, /* diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index adc870543b..450a89fe85 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.410 2009/10/14 22:14:24 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.411 2009/10/26 02:26:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -800,28 +800,17 @@ typedef struct WindowClause /* * RowMarkClause - - * representation of FOR UPDATE/SHARE clauses - * - * We create a separate RowMarkClause node for each target relation. In the - * output of the parser and rewriter, all RowMarkClauses have rti == prti and - * isParent == false. When the planner discovers that a target relation - * is the root of an inheritance tree, it sets isParent true, and adds an - * additional RowMarkClause to the list for each child relation (including - * the target rel itself in its role as a child). The child entries have - * rti == child rel's RT index, prti == parent's RT index, and can therefore - * be recognized as children by the fact that prti != rti. - * rowmarkId is a unique ID for the RowMarkClause across an entire query, - * and is assigned during planning; it's always zero upstream of the planner. + * parser output representation of FOR UPDATE/SHARE clauses + * + * Query.rowMarks contains a separate RowMarkClause node for each relation + * identified as a FOR UPDATE/SHARE target. */ typedef struct RowMarkClause { NodeTag type; Index rti; /* range table index of target relation */ - Index prti; /* range table index of parent relation */ - Index rowmarkId; /* unique identifier assigned by planner */ bool forUpdate; /* true = FOR UPDATE, false = FOR SHARE */ bool noWait; /* NOWAIT option */ - bool isParent; /* set by planner when expanding inheritance */ } RowMarkClause; /* diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 10177f3d7f..e9c994e4f2 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/plannodes.h,v 1.112 2009/10/12 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/plannodes.h,v 1.113 2009/10/26 02:26:42 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ typedef struct PlannedStmt Bitmapset *rewindPlanIDs; /* indices of subplans that require REWIND */ - List *rowMarks; /* a list of RowMarkClause's */ + List *rowMarks; /* a list of PlanRowMark's */ List *relationOids; /* OIDs of relations the plan depends on */ @@ -167,6 +167,8 @@ typedef struct ModifyTable List *resultRelations; /* integer list of RT indexes */ List *plans; /* plan(s) producing source data */ List *returningLists; /* per-target-table RETURNING tlists */ + List *rowMarks; /* PlanRowMarks (non-locking only) */ + int epqParam; /* ID of Param for EvalPlanQual re-eval */ } ModifyTable; /* ---------------- @@ -620,12 +622,15 @@ typedef struct SetOp * * rowMarks identifies the rels to be locked by this node; it should be * a subset of the rowMarks listed in the top-level PlannedStmt. + * epqParam is a Param that all scan nodes below this one must depend on. + * It is used to force re-evaluation of the plan during EvalPlanQual. * ---------------- */ typedef struct LockRows { Plan plan; - List *rowMarks; /* a list of RowMarkClause's */ + List *rowMarks; /* a list of PlanRowMark's */ + int epqParam; /* ID of Param for EvalPlanQual re-eval */ } LockRows; /* ---------------- @@ -644,6 +649,63 @@ typedef struct Limit /* + * RowMarkType - + * enums for types of row-marking operations + * + * When doing UPDATE, DELETE, or SELECT FOR UPDATE/SHARE, we have to uniquely + * identify all the source rows, not only those from the target relations, so + * that we can perform EvalPlanQual rechecking at need. For plain tables we + * can just fetch the TID, the same as for a target relation. Otherwise (for + * example for VALUES or FUNCTION scans) we have to copy the whole row value. + * The latter is pretty inefficient but fortunately the case is not + * performance-critical in practice. + */ +typedef enum RowMarkType +{ + ROW_MARK_EXCLUSIVE, /* obtain exclusive tuple lock */ + ROW_MARK_SHARE, /* obtain shared tuple lock */ + ROW_MARK_REFERENCE, /* just fetch the TID */ + ROW_MARK_COPY /* physically copy the row value */ +} RowMarkType; + +#define RowMarkRequiresRowShareLock(marktype) ((marktype) <= ROW_MARK_SHARE) + +/* + * PlanRowMark - + * plan-time representation of FOR UPDATE/SHARE clauses + * + * When doing UPDATE, DELETE, or SELECT FOR UPDATE/SHARE, we create a separate + * PlanRowMark node for each non-target relation in the query. Relations that + * are not specified as FOR UPDATE/SHARE are marked ROW_MARK_REFERENCE (if + * real tables) or ROW_MARK_COPY (if not). + * + * Initially all PlanRowMarks have rti == prti and isParent == false. + * When the planner discovers that a relation is the root of an inheritance + * tree, it sets isParent true, and adds an additional PlanRowMark to the + * list for each child relation (including the target rel itself in its role + * as a child). The child entries have rti == child rel's RT index and + * prti == parent's RT index, and can therefore be recognized as children by + * the fact that prti != rti. + * + * The AttrNumbers are filled in during preprocess_targetlist. We use + * different subsets of them for plain relations, inheritance children, + * and non-table relations. + */ +typedef struct PlanRowMark +{ + NodeTag type; + Index rti; /* range table index of markable relation */ + Index prti; /* range table index of parent relation */ + RowMarkType markType; /* see enum above */ + bool noWait; /* NOWAIT option */ + bool isParent; /* true if this is a "dummy" parent entry */ + AttrNumber ctidAttNo; /* resno of ctid junk attribute, if any */ + AttrNumber toidAttNo; /* resno of tableoid junk attribute, if any */ + AttrNumber wholeAttNo; /* resno of whole-row junk attribute, if any */ +} PlanRowMark; + + +/* * Plan invalidation info * * We track the objects on which a PlannedStmt depends in two ways: diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 8edb58727c..59f83e8562 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.177 2009/10/12 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.178 2009/10/26 02:26:43 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -68,13 +68,13 @@ typedef struct PlannerGlobal List *subrtables; /* Rangetables for SubPlan nodes */ - List *subrowmarks; /* RowMarkClauses for SubPlan nodes */ + List *subrowmarks; /* PlanRowMarks for SubPlan nodes */ Bitmapset *rewindPlanIDs; /* indices of subplans that require REWIND */ List *finalrtable; /* "flat" rangetable for executor */ - List *finalrowmarks; /* "flat" list of RowMarkClauses */ + List *finalrowmarks; /* "flat" list of PlanRowMarks */ List *relationOids; /* OIDs of relations the plan depends on */ @@ -82,8 +82,6 @@ typedef struct PlannerGlobal Index lastPHId; /* highest PlaceHolderVar ID assigned */ - Index lastRowmarkId; /* highest RowMarkClause ID assigned */ - bool transientPlan; /* redo plan when TransactionXmin changes? */ } PlannerGlobal; @@ -169,6 +167,8 @@ typedef struct PlannerInfo List *append_rel_list; /* list of AppendRelInfos */ + List *rowMarks; /* list of PlanRowMarks */ + List *placeholder_list; /* list of PlaceHolderInfos */ List *query_pathkeys; /* desired pathkeys for query_planner(), and diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index acf24bc17e..9a661a5ee8 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.120 2009/10/12 18:10:51 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.121 2009/10/26 02:26:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -68,7 +68,7 @@ extern Group *make_group(PlannerInfo *root, List *tlist, List *qual, Plan *lefttree); extern Plan *materialize_finished_plan(Plan *subplan); extern Unique *make_unique(Plan *lefttree, List *distinctList); -extern LockRows *make_lockrows(Plan *lefttree, List *rowMarks); +extern LockRows *make_lockrows(Plan *lefttree, List *rowMarks, int epqParam); extern Limit *make_limit(Plan *lefttree, Node *limitOffset, Node *limitCount, int64 offset_est, int64 count_est); extern SetOp *make_setop(SetOpCmd cmd, SetOpStrategy strategy, Plan *lefttree, @@ -77,7 +77,8 @@ extern SetOp *make_setop(SetOpCmd cmd, SetOpStrategy strategy, Plan *lefttree, extern Result *make_result(PlannerInfo *root, List *tlist, Node *resconstantqual, Plan *subplan); extern ModifyTable *make_modifytable(CmdType operation, List *resultRelations, - List *subplans, List *returningLists); + List *subplans, List *returningLists, + List *rowMarks, int epqParam); extern bool is_projection_capable_plan(Plan *plan); /* diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index e8dfb1e28f..982635a57d 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.66 2009/05/12 00:56:05 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/prep.h,v 1.67 2009/10/26 02:26:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -40,6 +40,8 @@ extern Expr *canonicalize_qual(Expr *qual); */ extern List *preprocess_targetlist(PlannerInfo *root, List *tlist); +extern PlanRowMark *get_plan_rowmark(List *rowmarks, Index rtindex); + /* * prototypes for prepunion.c */ diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h index dcae8031c3..954cff69ac 100644 --- a/src/include/optimizer/subselect.h +++ b/src/include/optimizer/subselect.h @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/subselect.h,v 1.37 2009/06/11 14:49:11 momjian Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/subselect.h,v 1.38 2009/10/26 02:26:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,6 +29,6 @@ extern void SS_finalize_plan(PlannerInfo *root, Plan *plan, bool attach_initplans); extern Param *SS_make_initplan_from_plan(PlannerInfo *root, Plan *plan, Oid resulttype, int32 resulttypmod); -extern int SS_assign_worktable_param(PlannerInfo *root); +extern int SS_assign_special_param(PlannerInfo *root); #endif /* SUBSELECT_H */ diff --git a/src/include/parser/parsetree.h b/src/include/parser/parsetree.h index 1aeea5bba0..2399dccf07 100644 --- a/src/include/parser/parsetree.h +++ b/src/include/parser/parsetree.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/parsetree.h,v 1.37 2009/01/01 17:24:00 momjian Exp $ + * $PostgreSQL: pgsql/src/include/parser/parsetree.h,v 1.38 2009/10/26 02:26:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -74,6 +74,6 @@ extern TargetEntry *get_tle_by_resno(List *tlist, AttrNumber resno); * ---------------- */ -extern RowMarkClause *get_rowmark(Query *qry, Index rtindex); +extern RowMarkClause *get_parse_rowmark(Query *qry, Index rtindex); #endif /* PARSETREE_H */ |
