diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-11 01:16:30 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-11 01:16:30 +0000 |
commit | 6808f1b1de0ebcd4af558ba84c3226b2027f55ea (patch) | |
tree | ebd12580d3aaca6ec79b5d99563a1eff02451e88 /src/include/executor | |
parent | 85d72f05167b87bc44464b2eabea8538f1fd1e45 (diff) | |
download | postgresql-6808f1b1de0ebcd4af558ba84c3226b2027f55ea.tar.gz postgresql-6808f1b1de0ebcd4af558ba84c3226b2027f55ea.zip |
Support UPDATE/DELETE WHERE CURRENT OF cursor_name, per SQL standard.
Along the way, allow FOR UPDATE in non-WITH-HOLD cursors; there may once
have been a reason to disallow that, but it seems to work now, and it's
really rather necessary if you want to select a row via a cursor and then
update it in a concurrent-safe fashion.
Original patch by Arul Shaji, rather heavily editorialized by Tom Lane.
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/executor.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index f9d8d107b36..408519c1e35 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.139 2007/02/27 01:11:25 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.140 2007/06/11 01:16:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -71,6 +71,12 @@ extern bool ExecSupportsBackwardScan(Plan *node); extern bool ExecMayReturnRawTuples(PlanState *node); /* + * prototypes from functions in execCurrent.c + */ +extern bool execCurrentOf(char *cursor_name, Oid table_oid, + ItemPointer current_tid); + +/* * prototypes from functions in execGrouping.c */ extern bool execTuplesMatch(TupleTableSlot *slot1, @@ -135,6 +141,7 @@ extern void ExecConstraints(ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate); extern TupleTableSlot *EvalPlanQual(EState *estate, Index rti, ItemPointer tid, TransactionId priorXmax, CommandId curCid); +extern PlanState *ExecGetActivePlanTree(QueryDesc *queryDesc); extern DestReceiver *CreateIntoRelDestReceiver(void); /* |