diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-03-21 23:00:40 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-03-21 23:00:40 +0200 |
commit | c35a3fb5e067fc95f13206418e3785d2cb059da1 (patch) | |
tree | cc2405cdee74e4550943374264c0ede23aaf9d18 /src/backend/access/heap/heapam_handler.c | |
parent | 02eb07ea89d27f1d05a5055bf779042d2953b4e7 (diff) | |
download | postgresql-c35a3fb5e067fc95f13206418e3785d2cb059da1.tar.gz postgresql-c35a3fb5e067fc95f13206418e3785d2cb059da1.zip |
Allow table AM tuple_insert() method to return the different slot
This allows table AM to return a native tuple slot even if
VirtualTupleTableSlot is given as an input. Native tuple slots have knowledge
about system attributes, which could be accessed in the future.
table_multi_insert() method already can modify the input 'slots' array.
Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com
Reviewed-by: Matthias van de Meent, Mark Dilger, Pavel Borisov
Reviewed-by: Nikita Malakhov, Japin Li
Diffstat (limited to 'src/backend/access/heap/heapam_handler.c')
-rw-r--r-- | src/backend/access/heap/heapam_handler.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c index 4dd1341f606..2b7c7026429 100644 --- a/src/backend/access/heap/heapam_handler.c +++ b/src/backend/access/heap/heapam_handler.c @@ -237,7 +237,7 @@ heapam_tuple_satisfies_snapshot(Relation rel, TupleTableSlot *slot, * ---------------------------------------------------------------------------- */ -static void +static TupleTableSlot * heapam_tuple_insert(Relation relation, TupleTableSlot *slot, CommandId cid, int options, BulkInsertState bistate) { @@ -254,6 +254,8 @@ heapam_tuple_insert(Relation relation, TupleTableSlot *slot, CommandId cid, if (shouldFree) pfree(tuple); + + return slot; } static void |