diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-02 01:45:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-02 01:45:28 +0000 |
commit | 902d1cb35f69464e1e13015b9e05abdb76a7444d (patch) | |
tree | 995e1ec29c8a937a3890956065a31c1ab9d7c6bd /src/backend/executor/execTuples.c | |
parent | 492059dabae9643f097fcd0a4f8860366563843d (diff) | |
download | postgresql-902d1cb35f69464e1e13015b9e05abdb76a7444d.tar.gz postgresql-902d1cb35f69464e1e13015b9e05abdb76a7444d.zip |
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/backend/executor/execTuples.c')
-rw-r--r-- | src/backend/executor/execTuples.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 7d92f8deff4..0c7052c9b31 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execTuples.c,v 1.103 2008/10/28 22:02:05 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execTuples.c,v 1.104 2008/11/02 01:45:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1126,12 +1126,12 @@ BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) TupleDesc tupdesc = attinmeta->tupdesc; int natts = tupdesc->natts; Datum *dvalues; - char *nulls; + bool *nulls; int i; HeapTuple tuple; dvalues = (Datum *) palloc(natts * sizeof(Datum)); - nulls = (char *) palloc(natts * sizeof(char)); + nulls = (bool *) palloc(natts * sizeof(bool)); /* Call the "in" function for each non-dropped attribute */ for (i = 0; i < natts; i++) @@ -1144,22 +1144,22 @@ BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) attinmeta->attioparams[i], attinmeta->atttypmods[i]); if (values[i] != NULL) - nulls[i] = ' '; + nulls[i] = false; else - nulls[i] = 'n'; + nulls[i] = true; } else { /* Handle dropped attributes by setting to NULL */ dvalues[i] = (Datum) 0; - nulls[i] = 'n'; + nulls[i] = true; } } /* * Form a tuple */ - tuple = heap_formtuple(tupdesc, dvalues, nulls); + tuple = heap_form_tuple(tupdesc, dvalues, nulls); /* * Release locally palloc'd space. XXX would probably be good to pfree |