diff options
| author | Tom Lane | 2008-11-02 01:45:28 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-11-02 01:45:28 +0000 |
| commit | 902d1cb35f69464e1e13015b9e05abdb76a7444d (patch) | |
| tree | 995e1ec29c8a937a3890956065a31c1ab9d7c6bd /src/include | |
| parent | 492059dabae9643f097fcd0a4f8860366563843d (diff) | |
Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple,
and heap_deformtuple in favor of the newer functions heap_form_tuple et al
(which do the same things but use bool control flags instead of arbitrary
char values). Eliminate the former duplicate coding of these functions,
reducing the deprecated functions to mere wrappers around the newer ones.
We can't get rid of them entirely because add-on modules probably still
contain many instances of the old coding style.
Kris Jurka
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/htup.h | 11 | ||||
| -rw-r--r-- | src/include/funcapi.h | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 0803c1b2c7..6bcd9cdcbc 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.102 2008/10/28 15:51:03 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.103 2008/11/02 01:45:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -823,20 +823,21 @@ extern HeapTuple heap_copytuple(HeapTuple tuple); extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest); extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, Datum *values, bool *isnull); -extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor, - Datum *values, char *nulls); extern HeapTuple heap_modify_tuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *replValues, bool *replIsnull, bool *doReplace); +extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, + Datum *values, bool *isnull); +/* these three are deprecated versions of the three above: */ +extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor, + Datum *values, char *nulls); extern HeapTuple heap_modifytuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *replValues, char *replNulls, char *replActions); -extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, - Datum *values, bool *isnull); extern void heap_deformtuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *values, char *nulls); extern void heap_freetuple(HeapTuple htup); diff --git a/src/include/funcapi.h b/src/include/funcapi.h index c4eb44398b..f5b9e18abb 100644 --- a/src/include/funcapi.h +++ b/src/include/funcapi.h @@ -9,7 +9,7 @@ * * Copyright (c) 2002-2008, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/funcapi.h,v 1.26 2008/01/01 19:45:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/funcapi.h,v 1.27 2008/11/02 01:45:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -113,7 +113,7 @@ typedef struct FuncCallContext * * tuple_desc is for use when returning tuples (i.e. composite data types) * and is only needed if you are going to build the tuples with - * heap_formtuple() rather than with BuildTupleFromCStrings(). Note that + * heap_form_tuple() rather than with BuildTupleFromCStrings(). Note that * the TupleDesc pointer stored here should usually have been run through * BlessTupleDesc() first. */ @@ -187,7 +187,7 @@ extern TupleDesc build_function_result_tupdesc_t(HeapTuple procTuple); * External declarations: * TupleDesc BlessTupleDesc(TupleDesc tupdesc) - "Bless" a completed tuple * descriptor so that it can be used to return properly labeled tuples. - * You need to call this if you are going to use heap_formtuple directly. + * You need to call this if you are going to use heap_form_tuple directly. * TupleDescGetAttInMetadata does it for you, however, so no need to call * it if you call TupleDescGetAttInMetadata. * AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc) - Build an |
