aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tablespace.c')
-rw-r--r--src/backend/commands/tablespace.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index c19eedcb6d5..b87ae345935 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.57 2008/06/19 00:46:04 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.58 2008/11/02 01:45:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -197,7 +197,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
#ifdef HAVE_SYMLINK
Relation rel;
Datum values[Natts_pg_tablespace];
- char nulls[Natts_pg_tablespace];
+ bool nulls[Natts_pg_tablespace];
HeapTuple tuple;
Oid tablespaceoid;
char *location;
@@ -278,7 +278,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
*/
rel = heap_open(TableSpaceRelationId, RowExclusiveLock);
- MemSet(nulls, ' ', Natts_pg_tablespace);
+ MemSet(nulls, false, sizeof(nulls));
values[Anum_pg_tablespace_spcname - 1] =
DirectFunctionCall1(namein, CStringGetDatum(stmt->tablespacename));
@@ -286,9 +286,9 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
ObjectIdGetDatum(ownerId);
values[Anum_pg_tablespace_spclocation - 1] =
CStringGetTextDatum(location);
- nulls[Anum_pg_tablespace_spcacl - 1] = 'n';
+ nulls[Anum_pg_tablespace_spcacl - 1] = true;
- tuple = heap_formtuple(rel->rd_att, values, nulls);
+ tuple = heap_form_tuple(rel->rd_att, values, nulls);
tablespaceoid = simple_heap_insert(rel, tuple);
@@ -845,8 +845,8 @@ AlterTableSpaceOwner(const char *name, Oid newOwnerId)
if (spcForm->spcowner != newOwnerId)
{
Datum repl_val[Natts_pg_tablespace];
- char repl_null[Natts_pg_tablespace];
- char repl_repl[Natts_pg_tablespace];
+ bool repl_null[Natts_pg_tablespace];
+ bool repl_repl[Natts_pg_tablespace];
Acl *newAcl;
Datum aclDatum;
bool isNull;
@@ -870,10 +870,10 @@ AlterTableSpaceOwner(const char *name, Oid newOwnerId)
* anyway.
*/
- 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_tablespace_spcowner - 1] = 'r';
+ repl_repl[Anum_pg_tablespace_spcowner - 1] = true;
repl_val[Anum_pg_tablespace_spcowner - 1] = ObjectIdGetDatum(newOwnerId);
/*
@@ -888,11 +888,11 @@ AlterTableSpaceOwner(const char *name, Oid newOwnerId)
{
newAcl = aclnewowner(DatumGetAclP(aclDatum),
spcForm->spcowner, newOwnerId);
- repl_repl[Anum_pg_tablespace_spcacl - 1] = 'r';
+ repl_repl[Anum_pg_tablespace_spcacl - 1] = true;
repl_val[Anum_pg_tablespace_spcacl - 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);