aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execTuples.c14
-rw-r--r--src/backend/executor/spi.c12
2 files changed, 13 insertions, 13 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
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index e70e923dfc8..9cf119eaed9 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.199 2008/10/16 13:23:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.200 2008/11/02 01:45:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -627,7 +627,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
HeapTuple mtuple;
int numberOfAttributes;
Datum *v;
- char *n;
+ bool *n;
int i;
if (rel == NULL || tuple == NULL || natts < 0 || attnum == NULL || Values == NULL)
@@ -645,10 +645,10 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
SPI_result = 0;
numberOfAttributes = rel->rd_att->natts;
v = (Datum *) palloc(numberOfAttributes * sizeof(Datum));
- n = (char *) palloc(numberOfAttributes * sizeof(char));
+ n = (bool *) palloc(numberOfAttributes * sizeof(bool));
/* fetch old values and nulls */
- heap_deformtuple(tuple, rel->rd_att, v, n);
+ heap_deform_tuple(tuple, rel->rd_att, v, n);
/* replace values and nulls */
for (i = 0; i < natts; i++)
@@ -656,12 +656,12 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
if (attnum[i] <= 0 || attnum[i] > numberOfAttributes)
break;
v[attnum[i] - 1] = Values[i];
- n[attnum[i] - 1] = (Nulls && Nulls[i] == 'n') ? 'n' : ' ';
+ n[attnum[i] - 1] = (Nulls && Nulls[i] == 'n') ? true : false;
}
if (i == natts) /* no errors in *attnum */
{
- mtuple = heap_formtuple(rel->rd_att, v, n);
+ mtuple = heap_form_tuple(rel->rd_att, v, n);
/*
* copy the identification info of the old tuple: t_ctid, t_self, and