mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
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.
This commit is contained in:
@ -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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -70,6 +70,12 @@ extern bool ExecSupportsMarkRestore(NodeTag plantype);
|
||||
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
|
||||
*/
|
||||
@ -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);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user