aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.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/trigger.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/trigger.c')
-rw-r--r--src/backend/commands/trigger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index ffdb168236f..53fb1995fc8 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.238 2008/10/24 23:42:35 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.239 2008/11/02 01:45:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,7 +83,7 @@ CreateTrigger(CreateTrigStmt *stmt, Oid constraintOid)
int16 tgtype;
int2vector *tgattr;
Datum values[Natts_pg_trigger];
- char nulls[Natts_pg_trigger];
+ bool nulls[Natts_pg_trigger];
Relation rel;
AclResult aclresult;
Relation tgrel;
@@ -310,7 +310,7 @@ CreateTrigger(CreateTrigStmt *stmt, Oid constraintOid)
/*
* Build the new pg_trigger tuple.
*/
- memset(nulls, ' ', Natts_pg_trigger * sizeof(char));
+ memset(nulls, false, sizeof(nulls));
values[Anum_pg_trigger_tgrelid - 1] = ObjectIdGetDatum(RelationGetRelid(rel));
values[Anum_pg_trigger_tgname - 1] = DirectFunctionCall1(namein,
@@ -374,7 +374,7 @@ CreateTrigger(CreateTrigStmt *stmt, Oid constraintOid)
tgattr = buildint2vector(NULL, 0);
values[Anum_pg_trigger_tgattr - 1] = PointerGetDatum(tgattr);
- tuple = heap_formtuple(tgrel->rd_att, values, nulls);
+ tuple = heap_form_tuple(tgrel->rd_att, values, nulls);
/* force tuple to have the desired OID */
HeapTupleSetOid(tuple, trigoid);