diff options
author | Andres Freund <andres@anarazel.de> | 2018-09-25 16:27:48 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2018-09-25 16:27:48 -0700 |
commit | 29c94e03c7d05d2b29afa1de32795ce178531246 (patch) | |
tree | 9599ede8229db1171da69f40fe9842e7af84cd6e /src/backend/commands/copy.c | |
parent | bbdfbb9154fccf5b58ecbbdf4e8989e2fed206f8 (diff) | |
download | postgresql-29c94e03c7d05d2b29afa1de32795ce178531246.tar.gz postgresql-29c94e03c7d05d2b29afa1de32795ce178531246.zip |
Split ExecStoreTuple into ExecStoreHeapTuple and ExecStoreBufferHeapTuple.
Upcoming changes introduce further types of tuple table slots, in
preparation of making table storage pluggable. New storage methods
will have different representation of tuples, therefore the slot
accessor should refer explicitly to heap tuples.
Instead of just renaming the functions, split it into one function
that accepts heap tuples not residing in buffers, and one accepting
ones in buffers. Previously one function was used for both, but that
was a bit awkward already, and splitting will allow us to represent
slot types for tuples in buffers and normal memory separately.
This is split out from the patch introducing abstract slots, as this
largely consists out of mechanical changes.
Author: Ashutosh Bapat
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r-- | src/backend/commands/copy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 9bc67ce60fe..d06662bd32e 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -2684,7 +2684,7 @@ CopyFrom(CopyState cstate) /* Place tuple in tuple slot --- but slot shouldn't free it */ slot = myslot; - ExecStoreTuple(tuple, slot, InvalidBuffer, false); + ExecStoreHeapTuple(tuple, slot, false); /* Determine the partition to heap_insert the tuple into */ if (proute) @@ -3119,7 +3119,7 @@ CopyFromInsertBatch(CopyState cstate, EState *estate, CommandId mycid, List *recheckIndexes; cstate->cur_lineno = firstBufferedLineNo + i; - ExecStoreTuple(bufferedTuples[i], myslot, InvalidBuffer, false); + ExecStoreHeapTuple(bufferedTuples[i], myslot, false); recheckIndexes = ExecInsertIndexTuples(myslot, &(bufferedTuples[i]->t_self), estate, false, NULL, NIL); |