]> granicus.if.org Git - postgresql/commitdiff
Change heap_modifytuple() to require a TupleDesc rather than a
authorNeil Conway <neilc@samurai.com>
Thu, 27 Jan 2005 23:24:11 +0000 (23:24 +0000)
committerNeil Conway <neilc@samurai.com>
Thu, 27 Jan 2005 23:24:11 +0000 (23:24 +0000)
Relation. Patch from Alvaro Herrera, minor editorializing by
Neil Conway.

18 files changed:
src/backend/access/common/heaptuple.c
src/backend/catalog/aclchk.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_type.c
src/backend/commands/analyze.c
src/backend/commands/async.c
src/backend/commands/comment.c
src/backend/commands/dbcommands.c
src/backend/commands/functioncmds.c
src/backend/commands/schemacmds.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/backend/rewrite/rewriteDefine.c
src/backend/storage/large_object/inv_api.c
src/include/access/heapam.h

index d60cd2a214ae02aacfdd5d148f3a9a5c2ab90dd2..42643a87529bf3ea67c46f6fac0cc0e16e14e150 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.95 2004/12/31 21:59:07 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.96 2005/01/27 23:23:49 neilc Exp $
  *
  * NOTES
  *       The old interface functions have been converted to macros
@@ -662,19 +662,15 @@ heap_formtuple(TupleDesc tupleDescriptor,
  *
  *             forms a new tuple from an old tuple and a set of replacement values.
  *             returns a new palloc'ed tuple.
- *
- *             XXX it is misdesign that this is passed a Relation and not just a
- *             TupleDesc to describe the tuple structure.
  * ----------------
  */
 HeapTuple
 heap_modifytuple(HeapTuple tuple,
-                                Relation relation,
+                                TupleDesc tupleDesc,
                                 Datum *replValues,
                                 char *replNulls,
                                 char *replActions)
 {
-       TupleDesc       tupleDesc = RelationGetDescr(relation);
        int                     numberOfAttributes = tupleDesc->natts;
        int                     attoff;
        Datum      *values;
index bcf9712f5a7b814aef86d1feb1241f20874ae47b..23a4dbc03ae586a2c4ba2fb446fc38f58a6c962c 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.108 2004/12/31 21:59:38 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.109 2005/01/27 23:23:51 neilc Exp $
  *
  * NOTES
  *       See acl.h.
@@ -373,7 +373,7 @@ ExecuteGrantStmt_Relation(GrantStmt *stmt)
                replaces[Anum_pg_class_relacl - 1] = 'r';
                values[Anum_pg_class_relacl - 1] = PointerGetDatum(new_acl);
 
-               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, nulls, replaces);
 
                ReleaseSysCache(tuple);
 
@@ -531,7 +531,7 @@ ExecuteGrantStmt_Database(GrantStmt *stmt)
                replaces[Anum_pg_database_datacl - 1] = 'r';
                values[Anum_pg_database_datacl - 1] = PointerGetDatum(new_acl);
 
-               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, nulls, replaces);
 
                simple_heap_update(relation, &newtuple->t_self, newtuple);
 
@@ -685,7 +685,7 @@ ExecuteGrantStmt_Function(GrantStmt *stmt)
                replaces[Anum_pg_proc_proacl - 1] = 'r';
                values[Anum_pg_proc_proacl - 1] = PointerGetDatum(new_acl);
 
-               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, nulls, replaces);
 
                ReleaseSysCache(tuple);
 
@@ -848,7 +848,7 @@ ExecuteGrantStmt_Language(GrantStmt *stmt)
                replaces[Anum_pg_language_lanacl - 1] = 'r';
                values[Anum_pg_language_lanacl - 1] = PointerGetDatum(new_acl);
 
-               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, nulls, replaces);
 
                ReleaseSysCache(tuple);
 
@@ -1002,7 +1002,7 @@ ExecuteGrantStmt_Namespace(GrantStmt *stmt)
                replaces[Anum_pg_namespace_nspacl - 1] = 'r';
                values[Anum_pg_namespace_nspacl - 1] = PointerGetDatum(new_acl);
 
-               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, nulls, replaces);
 
                ReleaseSysCache(tuple);
 
@@ -1160,7 +1160,7 @@ ExecuteGrantStmt_Tablespace(GrantStmt *stmt)
                replaces[Anum_pg_tablespace_spcacl - 1] = 'r';
                values[Anum_pg_tablespace_spcacl - 1] = PointerGetDatum(new_acl);
 
-               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, nulls, replaces);
 
                simple_heap_update(relation, &newtuple->t_self, newtuple);
 
index e30cd76e161f1d4e55b4e4790118c37b020e52fc..4ec68f39f0a23c2c3bb75a9468f28b7b629ee201 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_operator.c,v 1.87 2004/12/31 21:59:38 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_operator.c,v 1.88 2005/01/27 23:23:51 neilc Exp $
  *
  * NOTES
  *       these routines moved here from commands/define.c and somewhat cleaned up.
@@ -637,7 +637,7 @@ OperatorCreate(const char *operatorName,
                                 operatorObjectId);
 
                tup = heap_modifytuple(tup,
-                                                          pg_operator_desc,
+                                                          RelationGetDescr(pg_operator_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
@@ -807,7 +807,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
                                }
 
                                tup = heap_modifytuple(tup,
-                                                                          pg_operator_desc,
+                                                                          RelationGetDescr(pg_operator_desc),
                                                                           values,
                                                                           nulls,
                                                                           replaces);
@@ -832,7 +832,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
                replaces[Anum_pg_operator_oprcom - 1] = 'r';
 
                tup = heap_modifytuple(tup,
-                                                          pg_operator_desc,
+                                                          RelationGetDescr(pg_operator_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
@@ -858,7 +858,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
                replaces[Anum_pg_operator_oprnegate - 1] = 'r';
 
                tup = heap_modifytuple(tup,
-                                                          pg_operator_desc,
+                                                          RelationGetDescr(pg_operator_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
index a6a8632b9b6de813931cd97607fbac7453a160db..01c67c2bfc4fb8c17c82e2cf1079ba5401a2f810 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.122 2004/12/31 21:59:38 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.123 2005/01/27 23:23:51 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -180,7 +180,7 @@ ProcedureCreate(const char *procedureName,
        /* proacl will be handled below */
 
        rel = heap_openr(ProcedureRelationName, RowExclusiveLock);
-       tupDesc = rel->rd_att;
+       tupDesc = RelationGetDescr(rel);
 
        /* Check for pre-existing definition */
        oldtup = SearchSysCache(PROCNAMENSP,
@@ -234,7 +234,7 @@ ProcedureCreate(const char *procedureName,
                replaces[Anum_pg_proc_proacl - 1] = ' ';
 
                /* Okay, do it... */
-               tup = heap_modifytuple(oldtup, rel, values, nulls, replaces);
+               tup = heap_modifytuple(oldtup, tupDesc, values, nulls, replaces);
                simple_heap_update(rel, &tup->t_self, tup);
 
                ReleaseSysCache(oldtup);
index 27d3eee98271bad559e85df4ae2f859f20bc2e4f..c6ff34762fe655365b0a8d6aa04039bad5a1a90a 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_type.c,v 1.97 2004/12/31 21:59:38 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_type.c,v 1.98 2005/01/27 23:23:51 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -179,7 +179,6 @@ TypeCreate(const char *typeName,
        char            replaces[Natts_pg_type];
        Datum           values[Natts_pg_type];
        NameData        name;
-       TupleDesc       tupDesc;
        int                     i;
 
        /*
@@ -296,7 +295,7 @@ TypeCreate(const char *typeName,
                 * Okay to update existing "shell" type tuple
                 */
                tup = heap_modifytuple(tup,
-                                                          pg_type_desc,
+                                                          RelationGetDescr(pg_type_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
@@ -309,9 +308,7 @@ TypeCreate(const char *typeName,
        }
        else
        {
-               tupDesc = pg_type_desc->rd_att;
-
-               tup = heap_formtuple(tupDesc,
+               tup = heap_formtuple(RelationGetDescr(pg_type_desc),
                                                         values,
                                                         nulls);
 
index e188f7297d511acadce55ba40510442238bde274..45f8c234c1544c69f89b9c6c74f0f4bf5e40c753 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.80 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.81 2005/01/27 23:23:53 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1193,7 +1193,7 @@ update_attstats(Oid relid, int natts, VacAttrStats **vacattrstats)
                {
                        /* Yes, replace it */
                        stup = heap_modifytuple(oldtup,
-                                                                       sd,
+                                                                       RelationGetDescr(sd),
                                                                        values,
                                                                        nulls,
                                                                        replaces);
index e93d9b711636e58b4d60b549b5b4620a4eaeeb9f..06f453df6df1b2f950f6f4a78c178e782d6e3706 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.118 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.119 2005/01/27 23:23:54 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -523,7 +523,7 @@ AtCommit_Notify(void)
                                ItemPointerData ctid;
                                int                     result;
 
-                               rTuple = heap_modifytuple(lTuple, lRel,
+                               rTuple = heap_modifytuple(lTuple, tdesc,
                                                                                  value, nulls, repl);
 
                                /*
@@ -942,7 +942,7 @@ ProcessIncomingNotify(void)
                         * tried to UNLISTEN us, so there can be no uncommitted
                         * changes.
                         */
-                       rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
+                       rTuple = heap_modifytuple(lTuple, tdesc, value, nulls, repl);
                        simple_heap_update(lRel, &lTuple->t_self, rTuple);
 
 #ifdef NOT_USED                                        /* currently there are no indexes */
index 1b417eb3ea317a8e90dc73a15da405af820792b4..973719d80588ca11100fd0634afd71fb9196025e 100644 (file)
@@ -7,7 +7,7 @@
  * Copyright (c) 1996-2005, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/comment.c,v 1.80 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/comment.c,v 1.81 2005/01/27 23:23:54 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -203,7 +203,7 @@ CreateComments(Oid oid, Oid classoid, int32 subid, char *comment)
                        simple_heap_delete(description, &oldtuple->t_self);
                else
                {
-                       newtuple = heap_modifytuple(oldtuple, description, values,
+                       newtuple = heap_modifytuple(oldtuple, RelationGetDescr(description), values,
                                                                                nulls, replaces);
                        simple_heap_update(description, &oldtuple->t_self, newtuple);
                }
index a602ff109cd2a14db941140a859a81ac05a8c03a..e5a2a0bcd3125f6b56993c98329fe7ebbbe03a70 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.148 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.149 2005/01/27 23:23:55 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -816,7 +816,7 @@ AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
                        repl_null[Anum_pg_database_datconfig - 1] = 'n';
        }
 
-       newtuple = heap_modifytuple(tuple, rel, repl_val, repl_null, repl_repl);
+       newtuple = heap_modifytuple(tuple, RelationGetDescr(rel), repl_val, repl_null, repl_repl);
        simple_heap_update(rel, &tuple->t_self, newtuple);
 
        /* Update indexes */
@@ -911,7 +911,7 @@ AlterDatabaseOwner(const char *dbname, AclId newOwnerSysId)
                        repl_val[Anum_pg_database_datacl - 1] = PointerGetDatum(newAcl);
                }
 
-               newtuple = heap_modifytuple(tuple, rel, repl_val, repl_null, repl_repl);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(rel), repl_val, repl_null, repl_repl);
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
 
index eb32ee48bae3f09a697aa7af6570446f761129cb..414b23cd870856ca27c8ca8881114da5dd5ab446 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.53 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.54 2005/01/27 23:23:55 neilc Exp $
  *
  * DESCRIPTION
  *       These routines take the parse tree and pick out the
@@ -793,7 +793,7 @@ AlterFunctionOwner(List *name, List *argtypes, AclId newOwnerSysId)
                        repl_val[Anum_pg_proc_proacl - 1] = PointerGetDatum(newAcl);
                }
 
-               newtuple = heap_modifytuple(tup, rel, repl_val, repl_null, repl_repl);
+               newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, repl_null, repl_repl);
 
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
index 575061cd36129beb5e9e9eb9a0236e740aa69de2..f6c7a624beada5f0c67fbfc05cd033393f3c0101 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.27 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.28 2005/01/27 23:23:55 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -339,7 +339,7 @@ AlterSchemaOwner(const char *name, AclId newOwnerSysId)
                        repl_val[Anum_pg_namespace_nspacl - 1] = PointerGetDatum(newAcl);
                }
 
-               newtuple = heap_modifytuple(tup, rel, repl_val, repl_null, repl_repl);
+               newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, repl_null, repl_repl);
 
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
index 6abf4ab65e151fef541915f0c4f0c6afdeedeec5..4f96902beabee6ba3cc1639ee9f9f0eceb479e97 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.144 2005/01/27 03:17:30 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.145 2005/01/27 23:23:55 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1760,7 +1760,7 @@ update_ri_trigger_args(Oid relid,
                values[Anum_pg_trigger_tgargs - 1] = PointerGetDatum(newtgargs);
                replaces[Anum_pg_trigger_tgargs - 1] = 'r';
 
-               tuple = heap_modifytuple(tuple, tgrel, values, nulls, replaces);
+               tuple = heap_modifytuple(tuple, RelationGetDescr(tgrel), values, nulls, replaces);
 
                /*
                 * Update pg_trigger and its indexes
@@ -5302,7 +5302,7 @@ ATExecChangeOwner(Oid relationOid, int32 newOwnerSysId)
                        repl_val[Anum_pg_class_relacl - 1] = PointerGetDatum(newAcl);
                }
 
-               newtuple = heap_modifytuple(tuple, class_rel, repl_val, repl_null, repl_repl);
+               newtuple = heap_modifytuple(tuple, RelationGetDescr(class_rel), repl_val, repl_null, repl_repl);
 
                simple_heap_update(class_rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(class_rel, newtuple);
index a1cb5fd8078cbc28096b9158c11be8ab7babd6d3..f59cd84e0eb9760bf96c61338851f8cbe2bdefa4 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.15 2004/12/31 21:59:41 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.16 2005/01/27 23:23:55 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -860,7 +860,7 @@ AlterTableSpaceOwner(const char *name, AclId newOwnerSysId)
                        repl_val[Anum_pg_tablespace_spcacl - 1] = PointerGetDatum(newAcl);
                }
 
-               newtuple = heap_modifytuple(tup, rel, repl_val, repl_null, repl_repl);
+               newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, repl_null, repl_repl);
 
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
index d9fffbec271fe5a63aeed7e55e88a231b3ce085e..b68d3264dc5039a5d81cab936d3ba9f46dbf0571 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.66 2005/01/24 23:21:57 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.67 2005/01/27 23:23:56 neilc Exp $
  *
  * DESCRIPTION
  *       The "DefineFoo" routines take the parse tree and pick out the
@@ -1230,8 +1230,9 @@ AlterDomainDefault(List *names, Node *defaultRaw)
                new_record_repl[Anum_pg_type_typdefault - 1] = 'r';
        }
 
-       newtuple = heap_modifytuple(tup, rel,
-                                                 new_record, new_record_nulls, new_record_repl);
+       newtuple = heap_modifytuple(tup, RelationGetDescr(rel),
+                                                               new_record, new_record_nulls,
+                                                               new_record_repl);
 
        simple_heap_update(rel, &tup->t_self, newtuple);
 
index ff4f33b0739ed1d1e1a6eb8193fb5bf08cd8b9e5..db4f903d1448bd8d517ae07b4dd4503ac5361af5 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.147 2004/12/31 21:59:42 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.148 2005/01/27 23:23:56 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -958,7 +958,7 @@ AlterUser(AlterUserStmt *stmt)
                new_record_repl[Anum_pg_shadow_valuntil - 1] = 'r';
        }
 
-       new_tuple = heap_modifytuple(tuple, pg_shadow_rel, new_record,
+       new_tuple = heap_modifytuple(tuple, pg_shadow_dsc, new_record,
                                                                 new_record_nulls, new_record_repl);
        simple_heap_update(pg_shadow_rel, &tuple->t_self, new_tuple);
 
@@ -1050,7 +1050,7 @@ AlterUserSet(AlterUserSetStmt *stmt)
                        repl_null[Anum_pg_shadow_useconfig - 1] = 'n';
        }
 
-       newtuple = heap_modifytuple(oldtuple, rel, repl_val, repl_null, repl_repl);
+       newtuple = heap_modifytuple(oldtuple, RelationGetDescr(rel), repl_val, repl_null, repl_repl);
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
 
        CatalogUpdateIndexes(rel, newtuple);
@@ -1277,7 +1277,7 @@ RenameUser(const char *oldname, const char *newname)
                                (errmsg("MD5 password cleared because of user rename")));
        }
 
-       newtuple = heap_modifytuple(oldtuple, rel, repl_val, repl_null, repl_repl);
+       newtuple = heap_modifytuple(oldtuple, dsc, repl_val, repl_null, repl_repl);
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
 
        CatalogUpdateIndexes(rel, newtuple);
@@ -1672,7 +1672,7 @@ UpdateGroupMembership(Relation group_rel, HeapTuple group_tuple,
        new_record[Anum_pg_group_grolist - 1] = PointerGetDatum(newarray);
        new_record_repl[Anum_pg_group_grolist - 1] = 'r';
 
-       tuple = heap_modifytuple(group_tuple, group_rel,
+       tuple = heap_modifytuple(group_tuple, RelationGetDescr(group_rel),
                                                  new_record, new_record_nulls, new_record_repl);
 
        simple_heap_update(group_rel, &group_tuple->t_self, tuple);
index f02b288818992869bee662054e0a7d5a54441c05..1d9458e834ee19677ddc0cd08f714787a692df2f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.100 2005/01/10 20:02:21 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.101 2005/01/27 23:24:05 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -114,7 +114,7 @@ InsertRule(char *rulname,
                replaces[Anum_pg_rewrite_ev_qual - 1] = 'r';
                replaces[Anum_pg_rewrite_ev_action - 1] = 'r';
 
-               tup = heap_modifytuple(oldtup, pg_rewrite_desc,
+               tup = heap_modifytuple(oldtup, RelationGetDescr(pg_rewrite_desc),
                                                           values, nulls, replaces);
 
                simple_heap_update(pg_rewrite_desc, &tup->t_self, tup);
index a304cff9b3d2cccfcfb9d3e882d3439329f585ef..34129265796cdccb8e0a7e67a5ca1e8d77bb7fd9 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.108 2004/12/31 22:00:59 pgsql Exp $
+ *       $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.109 2005/01/27 23:24:09 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -570,7 +570,7 @@ inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
                        memset(replace, ' ', sizeof(replace));
                        values[Anum_pg_largeobject_data - 1] = PointerGetDatum(&workbuf);
                        replace[Anum_pg_largeobject_data - 1] = 'r';
-                       newtup = heap_modifytuple(oldtuple, lo_heap_r,
+                       newtup = heap_modifytuple(oldtuple, RelationGetDescr(lo_heap_r),
                                                                          values, nulls, replace);
                        simple_heap_update(lo_heap_r, &newtup->t_self, newtup);
                        CatalogIndexInsert(indstate, newtup);
index 2b5495ff287c49c4e753da52c287a1d8c95f15a5..6fa3bbf455039634d92cb32cb3141f6b906717ef 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.93 2004/12/31 22:03:21 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.94 2005/01/27 23:24:11 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -196,7 +196,7 @@ extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
 extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
                           Datum *values, char *nulls);
 extern HeapTuple heap_modifytuple(HeapTuple tuple,
-                                Relation relation,
+                                TupleDesc tupleDesc,
                                 Datum *replValues,
                                 char *replNulls,
                                 char *replActions);