aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-02 01:45:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-02 01:45:28 +0000
commit902d1cb35f69464e1e13015b9e05abdb76a7444d (patch)
tree995e1ec29c8a937a3890956065a31c1ab9d7c6bd /src/backend/bootstrap/bootstrap.c
parent492059dabae9643f097fcd0a4f8860366563843d (diff)
downloadpostgresql-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/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 04194acd3f2..c7bcfd24563 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.246 2008/09/30 10:52:11 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.247 2008/11/02 01:45:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -169,7 +169,7 @@ struct typmap
static struct typmap **Typ = NULL;
static struct typmap *Ap = NULL;
-static char Blanks[MAXATTR];
+static bool Nulls[MAXATTR];
Form_pg_attribute attrtypes[MAXATTR]; /* points to attribute info */
static Datum values[MAXATTR]; /* corresponding attribute values */
@@ -488,7 +488,7 @@ BootstrapModeMain(void)
for (i = 0; i < MAXATTR; i++)
{
attrtypes[i] = NULL;
- Blanks[i] = ' ';
+ Nulls[i] = false;
}
for (i = 0; i < STRTABLESIZE; ++i)
strtable[i] = NULL;
@@ -797,7 +797,7 @@ InsertOneTuple(Oid objectid)
tupDesc = CreateTupleDesc(numattr,
RelationGetForm(boot_reldesc)->relhasoids,
attrtypes);
- tuple = heap_formtuple(tupDesc, values, Blanks);
+ tuple = heap_form_tuple(tupDesc, values, Nulls);
if (objectid != (Oid) 0)
HeapTupleSetOid(tuple, objectid);
pfree(tupDesc); /* just free's tupDesc, not the attrtypes */
@@ -807,10 +807,10 @@ InsertOneTuple(Oid objectid)
elog(DEBUG4, "row inserted");
/*
- * Reset blanks for next tuple
+ * Reset null markers for next tuple
*/
for (i = 0; i < numattr; i++)
- Blanks[i] = ' ';
+ Nulls[i] = false;
}
/* ----------------
@@ -857,7 +857,7 @@ InsertOneNull(int i)
elog(DEBUG4, "inserting column %d NULL", i);
Assert(i >= 0 || i < MAXATTR);
values[i] = PointerGetDatum(NULL);
- Blanks[i] = 'n';
+ Nulls[i] = true;
}
/* ----------------