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/commands/schemacmds.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/commands/schemacmds.c')
-rw-r--r-- | src/backend/commands/schemacmds.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c index 8029013e2cc..f05fb00936c 100644 --- a/src/backend/commands/schemacmds.c +++ b/src/backend/commands/schemacmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.50 2008/06/14 18:04:33 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.51 2008/11/02 01:45:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -366,8 +366,8 @@ AlterSchemaOwner_internal(HeapTuple tup, Relation rel, Oid newOwnerId) if (nspForm->nspowner != newOwnerId) { Datum repl_val[Natts_pg_namespace]; - char repl_null[Natts_pg_namespace]; - char repl_repl[Natts_pg_namespace]; + bool repl_null[Natts_pg_namespace]; + bool repl_repl[Natts_pg_namespace]; Acl *newAcl; Datum aclDatum; bool isNull; @@ -397,10 +397,10 @@ AlterSchemaOwner_internal(HeapTuple tup, Relation rel, Oid newOwnerId) aclcheck_error(aclresult, ACL_KIND_DATABASE, get_database_name(MyDatabaseId)); - memset(repl_null, ' ', sizeof(repl_null)); - memset(repl_repl, ' ', sizeof(repl_repl)); + memset(repl_null, false, sizeof(repl_null)); + memset(repl_repl, false, sizeof(repl_repl)); - repl_repl[Anum_pg_namespace_nspowner - 1] = 'r'; + repl_repl[Anum_pg_namespace_nspowner - 1] = true; repl_val[Anum_pg_namespace_nspowner - 1] = ObjectIdGetDatum(newOwnerId); /* @@ -414,11 +414,11 @@ AlterSchemaOwner_internal(HeapTuple tup, Relation rel, Oid newOwnerId) { newAcl = aclnewowner(DatumGetAclP(aclDatum), nspForm->nspowner, newOwnerId); - repl_repl[Anum_pg_namespace_nspacl - 1] = 'r'; + repl_repl[Anum_pg_namespace_nspacl - 1] = true; repl_val[Anum_pg_namespace_nspacl - 1] = PointerGetDatum(newAcl); } - newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, repl_null, repl_repl); + newtuple = heap_modify_tuple(tup, RelationGetDescr(rel), repl_val, repl_null, repl_repl); simple_heap_update(rel, &newtuple->t_self, newtuple); CatalogUpdateIndexes(rel, newtuple); |