mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Give an 'options' parameter to tuple_delete/_update
The tuple_insert() method already has an equivalent argument, so this makes sense just on consistency grounds, for future growth. table_delete() can immediately use it to carry the 'changingPart' boolean; for table_update we don't have any options at present. Author: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> (older version) Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Antonin Houska <ah@cybertec.at> Discussion: https://postgr.es/m/202603171606.kf6pmhscqbqz@alvherre.pgsql
This commit is contained in:
@@ -1751,14 +1751,18 @@ ExecDeleteAct(ModifyTableContext *context, ResultRelInfo *resultRelInfo,
|
||||
ItemPointer tupleid, bool changingPart)
|
||||
{
|
||||
EState *estate = context->estate;
|
||||
uint32 options = 0;
|
||||
|
||||
if (changingPart)
|
||||
options |= TABLE_DELETE_CHANGING_PARTITION;
|
||||
|
||||
return table_tuple_delete(resultRelInfo->ri_RelationDesc, tupleid,
|
||||
estate->es_output_cid,
|
||||
options,
|
||||
estate->es_snapshot,
|
||||
estate->es_crosscheck_snapshot,
|
||||
true /* wait for commit */ ,
|
||||
&context->tmfd,
|
||||
changingPart);
|
||||
&context->tmfd);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2568,6 +2572,7 @@ lreplace:
|
||||
*/
|
||||
result = table_tuple_update(resultRelationDesc, tupleid, slot,
|
||||
estate->es_output_cid,
|
||||
0,
|
||||
estate->es_snapshot,
|
||||
estate->es_crosscheck_snapshot,
|
||||
true /* wait for commit */ ,
|
||||
|
||||
Reference in New Issue
Block a user