aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/opclasscmds.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/commands/opclasscmds.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/commands/opclasscmds.c')
-rw-r--r--src/backend/commands/opclasscmds.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index de114079e25..809e1b148a4 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.62 2008/06/19 00:46:04 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.63 2008/11/02 01:45:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -176,7 +176,7 @@ CreateOpFamily(char *amname, char *opfname, Oid namespaceoid, Oid amoid)
Relation rel;
HeapTuple tup;
Datum values[Natts_pg_opfamily];
- char nulls[Natts_pg_opfamily];
+ bool nulls[Natts_pg_opfamily];
NameData opfName;
ObjectAddress myself,
referenced;
@@ -201,7 +201,7 @@ CreateOpFamily(char *amname, char *opfname, Oid namespaceoid, Oid amoid)
* Okay, let's create the pg_opfamily entry.
*/
memset(values, 0, sizeof(values));
- memset(nulls, ' ', sizeof(nulls));
+ memset(nulls, false, sizeof(nulls));
values[Anum_pg_opfamily_opfmethod - 1] = ObjectIdGetDatum(amoid);
namestrcpy(&opfName, opfname);
@@ -209,7 +209,7 @@ CreateOpFamily(char *amname, char *opfname, Oid namespaceoid, Oid amoid)
values[Anum_pg_opfamily_opfnamespace - 1] = ObjectIdGetDatum(namespaceoid);
values[Anum_pg_opfamily_opfowner - 1] = ObjectIdGetDatum(GetUserId());
- tup = heap_formtuple(rel->rd_att, values, nulls);
+ tup = heap_form_tuple(rel->rd_att, values, nulls);
opfamilyoid = simple_heap_insert(rel, tup);
@@ -264,7 +264,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
HeapTuple tup;
Form_pg_am pg_am;
Datum values[Natts_pg_opclass];
- char nulls[Natts_pg_opclass];
+ bool nulls[Natts_pg_opclass];
AclResult aclresult;
NameData opcName;
ObjectAddress myself,
@@ -570,7 +570,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
* Okay, let's create the pg_opclass entry.
*/
memset(values, 0, sizeof(values));
- memset(nulls, ' ', sizeof(nulls));
+ memset(nulls, false, sizeof(nulls));
values[Anum_pg_opclass_opcmethod - 1] = ObjectIdGetDatum(amoid);
namestrcpy(&opcName, opcname);
@@ -582,7 +582,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
values[Anum_pg_opclass_opcdefault - 1] = BoolGetDatum(stmt->isDefault);
values[Anum_pg_opclass_opckeytype - 1] = ObjectIdGetDatum(storageoid);
- tup = heap_formtuple(rel->rd_att, values, nulls);
+ tup = heap_form_tuple(rel->rd_att, values, nulls);
opclassoid = simple_heap_insert(rel, tup);
@@ -656,7 +656,7 @@ DefineOpFamily(CreateOpFamilyStmt *stmt)
Relation rel;
HeapTuple tup;
Datum values[Natts_pg_opfamily];
- char nulls[Natts_pg_opfamily];
+ bool nulls[Natts_pg_opfamily];
AclResult aclresult;
NameData opfName;
ObjectAddress myself,
@@ -719,7 +719,7 @@ DefineOpFamily(CreateOpFamilyStmt *stmt)
* Okay, let's create the pg_opfamily entry.
*/
memset(values, 0, sizeof(values));
- memset(nulls, ' ', sizeof(nulls));
+ memset(nulls, false, sizeof(nulls));
values[Anum_pg_opfamily_opfmethod - 1] = ObjectIdGetDatum(amoid);
namestrcpy(&opfName, opfname);
@@ -727,7 +727,7 @@ DefineOpFamily(CreateOpFamilyStmt *stmt)
values[Anum_pg_opfamily_opfnamespace - 1] = ObjectIdGetDatum(namespaceoid);
values[Anum_pg_opfamily_opfowner - 1] = ObjectIdGetDatum(GetUserId());
- tup = heap_formtuple(rel->rd_att, values, nulls);
+ tup = heap_form_tuple(rel->rd_att, values, nulls);
opfamilyoid = simple_heap_insert(rel, tup);
@@ -1226,7 +1226,7 @@ storeOperators(List *opfamilyname, Oid amoid,
{
Relation rel;
Datum values[Natts_pg_amop];
- char nulls[Natts_pg_amop];
+ bool nulls[Natts_pg_amop];
HeapTuple tup;
Oid entryoid;
ObjectAddress myself,
@@ -1259,7 +1259,7 @@ storeOperators(List *opfamilyname, Oid amoid,
/* Create the pg_amop entry */
memset(values, 0, sizeof(values));
- memset(nulls, ' ', sizeof(nulls));
+ memset(nulls, false, sizeof(nulls));
values[Anum_pg_amop_amopfamily - 1] = ObjectIdGetDatum(opfamilyoid);
values[Anum_pg_amop_amoplefttype - 1] = ObjectIdGetDatum(op->lefttype);
@@ -1268,7 +1268,7 @@ storeOperators(List *opfamilyname, Oid amoid,
values[Anum_pg_amop_amopopr - 1] = ObjectIdGetDatum(op->object);
values[Anum_pg_amop_amopmethod - 1] = ObjectIdGetDatum(amoid);
- tup = heap_formtuple(rel->rd_att, values, nulls);
+ tup = heap_form_tuple(rel->rd_att, values, nulls);
entryoid = simple_heap_insert(rel, tup);
@@ -1326,7 +1326,7 @@ storeProcedures(List *opfamilyname, Oid amoid,
{
Relation rel;
Datum values[Natts_pg_amproc];
- char nulls[Natts_pg_amproc];
+ bool nulls[Natts_pg_amproc];
HeapTuple tup;
Oid entryoid;
ObjectAddress myself,
@@ -1359,7 +1359,7 @@ storeProcedures(List *opfamilyname, Oid amoid,
/* Create the pg_amproc entry */
memset(values, 0, sizeof(values));
- memset(nulls, ' ', sizeof(nulls));
+ memset(nulls, false, sizeof(nulls));
values[Anum_pg_amproc_amprocfamily - 1] = ObjectIdGetDatum(opfamilyoid);
values[Anum_pg_amproc_amproclefttype - 1] = ObjectIdGetDatum(proc->lefttype);
@@ -1367,7 +1367,7 @@ storeProcedures(List *opfamilyname, Oid amoid,
values[Anum_pg_amproc_amprocnum - 1] = Int16GetDatum(proc->number);
values[Anum_pg_amproc_amproc - 1] = ObjectIdGetDatum(proc->object);
- tup = heap_formtuple(rel->rd_att, values, nulls);
+ tup = heap_form_tuple(rel->rd_att, values, nulls);
entryoid = simple_heap_insert(rel, tup);