summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAndres Freund2018-10-14 22:18:16 +0000
committerAndres Freund2018-10-15 22:17:04 +0000
commit9d906f1119de893a4ca533c5e7b97207a3aa963b (patch)
tree69424b7c149bf0ee3aeb2531da07d413dd0f4845 /src/include
parente73ca79fc78db4eb13b7f513f16b7164c7b05ba7 (diff)
Move generic slot support functions from heaptuple.c into execTuples.c.
heaptuple.c was never a particular good fit for slot_getattr(), slot_getsomeattrs() and slot_getmissingattrs(), but in upcoming changes slots will be made more abstract (allowing slots that contain different types of tuples), making it clearly the wrong place. Note that slot_deform_tuple() remains in it's current place, as it clearly deals with a HeapTuple. getmissingattrs() also remains, but it's less clear that that's correct - but execTuples.c wouldn't be the right place. Author: Ashutosh Bapat. Discussion: https://postgr.es/m/20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/htup_details.h2
-rw-r--r--src/include/executor/tuptable.h10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h
index 1867a70f6f..97d240fdbb 100644
--- a/src/include/access/htup_details.h
+++ b/src/include/access/htup_details.h
@@ -835,5 +835,7 @@ extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup);
extern size_t varsize_any(void *p);
extern HeapTuple heap_expand_tuple(HeapTuple sourceTuple, TupleDesc tupleDesc);
extern MinimalTuple minimal_expand_tuple(HeapTuple sourceTuple, TupleDesc tupleDesc);
+struct TupleTableSlot;
+extern void slot_deform_tuple(struct TupleTableSlot *slot, int natts);
#endif /* HTUP_DETAILS_H */
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h
index 43150d13b1..3c8d57f377 100644
--- a/src/include/executor/tuptable.h
+++ b/src/include/executor/tuptable.h
@@ -173,14 +173,18 @@ extern Datum ExecFetchSlotTupleDatum(TupleTableSlot *slot);
extern HeapTuple ExecMaterializeSlot(TupleTableSlot *slot);
extern TupleTableSlot *ExecCopySlot(TupleTableSlot *dstslot,
TupleTableSlot *srcslot);
+extern void slot_getmissingattrs(TupleTableSlot *slot, int startAttNum,
+ int lastAttNum);
+extern Datum slot_getattr(TupleTableSlot *slot, int attnum,
+ bool *isnull);
+extern void slot_getsomeattrs(TupleTableSlot *slot, int attnum);
/* in access/common/heaptuple.c */
-extern Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull);
-extern void slot_getsomeattrs(TupleTableSlot *slot, int attnum);
extern bool slot_attisnull(TupleTableSlot *slot, int attnum);
extern bool slot_getsysattr(TupleTableSlot *slot, int attnum,
Datum *value, bool *isnull);
-extern void slot_getmissingattrs(TupleTableSlot *slot, int startAttNum, int lastAttNum);
+extern Datum getmissingattr(TupleDesc tupleDesc,
+ int attnum, bool *isnull);
#ifndef FRONTEND