@@ -776,39 +776,6 @@ heap_form_tuple(TupleDesc tupleDescriptor,
776
776
return tuple ;
777
777
}
778
778
779
- /*
780
- *heap_formtuple
781
- *
782
- *construct a tuple from the given values[] and nulls[] arrays
783
- *
784
- *Null attributes are indicated by a 'n' in the appropriate byte
785
- *of nulls[]. Non-null attributes are indicated by a ' ' (space).
786
- *
787
- * OLD API with char 'n'/' ' convention for indicating nulls.
788
- * This is deprecated and should not be used in new code, but we keep it
789
- * around for use by old add-on modules.
790
- */
791
- HeapTuple
792
- heap_formtuple (TupleDesc tupleDescriptor ,
793
- Datum * values ,
794
- char * nulls )
795
- {
796
- HeapTuple tuple ;/* return tuple */
797
- int numberOfAttributes = tupleDescriptor -> natts ;
798
- bool * boolNulls = (bool * )palloc (numberOfAttributes * sizeof (bool ));
799
- int i ;
800
-
801
- for (i = 0 ;i < numberOfAttributes ;i ++ )
802
- boolNulls [i ]= (nulls [i ]== 'n' );
803
-
804
- tuple = heap_form_tuple (tupleDescriptor ,values ,boolNulls );
805
-
806
- pfree (boolNulls );
807
-
808
- return tuple ;
809
- }
810
-
811
-
812
779
/*
813
780
* heap_modify_tuple
814
781
*form a new tuple from an old tuple and a set of replacement values.
@@ -879,44 +846,6 @@ heap_modify_tuple(HeapTuple tuple,
879
846
return newTuple ;
880
847
}
881
848
882
- /*
883
- *heap_modifytuple
884
- *
885
- *forms a new tuple from an old tuple and a set of replacement values.
886
- *returns a new palloc'ed tuple.
887
- *
888
- * OLD API with char 'n'/' ' convention for indicating nulls, and
889
- * char 'r'/' ' convention for indicating whether to replace columns.
890
- * This is deprecated and should not be used in new code, but we keep it
891
- * around for use by old add-on modules.
892
- */
893
- HeapTuple
894
- heap_modifytuple (HeapTuple tuple ,
895
- TupleDesc tupleDesc ,
896
- Datum * replValues ,
897
- char * replNulls ,
898
- char * replActions )
899
- {
900
- HeapTuple result ;
901
- int numberOfAttributes = tupleDesc -> natts ;
902
- bool * boolNulls = (bool * )palloc (numberOfAttributes * sizeof (bool ));
903
- bool * boolActions = (bool * )palloc (numberOfAttributes * sizeof (bool ));
904
- int attnum ;
905
-
906
- for (attnum = 0 ;attnum < numberOfAttributes ;attnum ++ )
907
- {
908
- boolNulls [attnum ]= (replNulls [attnum ]== 'n' );
909
- boolActions [attnum ]= (replActions [attnum ]== 'r' );
910
- }
911
-
912
- result = heap_modify_tuple (tuple ,tupleDesc ,replValues ,boolNulls ,boolActions );
913
-
914
- pfree (boolNulls );
915
- pfree (boolActions );
916
-
917
- return result ;
918
- }
919
-
920
849
/*
921
850
* heap_deform_tuple
922
851
*Given a tuple, extract data into values/isnull arrays; this is
@@ -1024,46 +953,6 @@ heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
1024
953
}
1025
954
}
1026
955
1027
- /*
1028
- *heap_deformtuple
1029
- *
1030
- *Given a tuple, extract data into values/nulls arrays; this is
1031
- *the inverse of heap_formtuple.
1032
- *
1033
- *Storage for the values/nulls arrays is provided by the caller;
1034
- *it should be sized according to tupleDesc->natts not
1035
- *HeapTupleHeaderGetNatts(tuple->t_data).
1036
- *
1037
- *Note that for pass-by-reference datatypes, the pointer placed
1038
- *in the Datum will point into the given tuple.
1039
- *
1040
- *When all or most of a tuple's fields need to be extracted,
1041
- *this routine will be significantly quicker than a loop around
1042
- *heap_getattr; the loop will become O(N^2) as soon as any
1043
- *noncacheable attribute offsets are involved.
1044
- *
1045
- * OLD API with char 'n'/' ' convention for indicating nulls.
1046
- * This is deprecated and should not be used in new code, but we keep it
1047
- * around for use by old add-on modules.
1048
- */
1049
- void
1050
- heap_deformtuple (HeapTuple tuple ,
1051
- TupleDesc tupleDesc ,
1052
- Datum * values ,
1053
- char * nulls )
1054
- {
1055
- int natts = tupleDesc -> natts ;
1056
- bool * boolNulls = (bool * )palloc (natts * sizeof (bool ));
1057
- int attnum ;
1058
-
1059
- heap_deform_tuple (tuple ,tupleDesc ,values ,boolNulls );
1060
-
1061
- for (attnum = 0 ;attnum < natts ;attnum ++ )
1062
- nulls [attnum ]= (boolNulls [attnum ] ?'n' :' ' );
1063
-
1064
- pfree (boolNulls );
1065
- }
1066
-
1067
956
/*
1068
957
* slot_deform_tuple
1069
958
*Given a TupleTableSlot, extract data from the slot's physical tuple