|
88 | 88 | #include "nodes/nodeFuncs.h"
|
89 | 89 | #include "storage/bufmgr.h"
|
90 | 90 | #include "utils/builtins.h"
|
91 |
| -#include "utils/expandeddatum.h" |
92 | 91 | #include "utils/lsyscache.h"
|
93 | 92 | #include "utils/typcache.h"
|
94 | 93 |
|
@@ -813,52 +812,6 @@ ExecCopySlot(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
|
813 | 812 | return ExecStoreTuple(newTuple, dstslot, InvalidBuffer, true);
|
814 | 813 | }
|
815 | 814 |
|
816 |
| -/* -------------------------------- |
817 |
| - * ExecMakeSlotContentsReadOnly |
818 |
| - * Mark any R/W expanded datums in the slot as read-only. |
819 |
| - * |
820 |
| - * This is needed when a slot that might contain R/W datum references is to be |
821 |
| - * used as input for general expression evaluation. Since the expression(s) |
822 |
| - * might contain more than one Var referencing the same R/W datum, we could |
823 |
| - * get wrong answers if functions acting on those Vars thought they could |
824 |
| - * modify the expanded value in-place. |
825 |
| - * |
826 |
| - * For notational reasons, we return the same slot passed in. |
827 |
| - * -------------------------------- |
828 |
| - */ |
829 |
| -TupleTableSlot * |
830 |
| -ExecMakeSlotContentsReadOnly(TupleTableSlot *slot) |
831 |
| -{ |
832 |
| - /* |
833 |
| - * sanity checks |
834 |
| - */ |
835 |
| - Assert(slot != NULL); |
836 |
| - Assert(slot->tts_tupleDescriptor != NULL); |
837 |
| - Assert(!slot->tts_isempty); |
838 |
| - |
839 |
| - /* |
840 |
| - * If the slot contains a physical tuple, it can't contain any expanded |
841 |
| - * datums, because we flatten those when making a physical tuple. This |
842 |
| - * might change later; but for now, we need do nothing unless the slot is |
843 |
| - * virtual. |
844 |
| - */ |
845 |
| - if (slot->tts_tuple == NULL) |
846 |
| - { |
847 |
| - Form_pg_attribute *att = slot->tts_tupleDescriptor->attrs; |
848 |
| - int attnum; |
849 |
| - |
850 |
| - for (attnum = 0; attnum < slot->tts_nvalid; attnum++) |
851 |
| - { |
852 |
| - slot->tts_values[attnum] = |
853 |
| - MakeExpandedObjectReadOnly(slot->tts_values[attnum], |
854 |
| - slot->tts_isnull[attnum], |
855 |
| - att[attnum]->attlen); |
856 |
| - } |
857 |
| - } |
858 |
| - |
859 |
| - return slot; |
860 |
| -} |
861 |
| - |
862 | 815 |
|
863 | 816 | /* ----------------------------------------------------------------
|
864 | 817 | * convenience initialization routines
|
|
0 commit comments