Patchers,

Here is a simple patch that changes heap_modifytuple to require a
TupleDesc instead of a Relation (driven off a comment in the same
function).  I didn't really look to see if anything can be simplified
because of this change.

All backend callers changed; there are no callers in contrib (that grep
can find, that is).  Regression test pass, no new compiler warning
generated.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La verdad no siempre es bonita, pero el hambre de ella sí"
Index: src/backend/access/common/heaptuple.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/access/common/heaptuple.c,v
retrieving revision 1.94
diff -c -r1.94 heaptuple.c
*** src/backend/access/common/heaptuple.c       29 Aug 2004 05:06:39 -0000      1.94
--- src/backend/access/common/heaptuple.c       8 Sep 2004 19:45:06 -0000
***************
*** 662,680 ****
   *
   *            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,
                                 Datum *replValues,
                                 char *replNulls,
                                 char *replActions)
  {
-       TupleDesc       tupleDesc = RelationGetDescr(relation);
        int                     numberOfAttributes = tupleDesc->natts;
        int                     attoff;
        Datum      *values;
--- 662,676 ----
   *
   *            forms a new tuple from an old tuple and a set of replacement values.
   *            returns a new palloc'ed tuple.
   * ----------------
   */
  HeapTuple
  heap_modifytuple(HeapTuple tuple,
!                                TupleDesc tupleDesc,
                                 Datum *replValues,
                                 char *replNulls,
                                 char *replActions)
  {
        int                     numberOfAttributes = tupleDesc->natts;
        int                     attoff;
        Datum      *values;
Index: src/backend/catalog/aclchk.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/catalog/aclchk.c,v
retrieving revision 1.107
diff -c -r1.107 aclchk.c
*** src/backend/catalog/aclchk.c        29 Aug 2004 05:06:41 -0000      1.107
--- src/backend/catalog/aclchk.c        8 Sep 2004 19:54:00 -0000
***************
*** 373,379 ****
                replaces[Anum_pg_class_relacl - 1] = 'r';
                values[Anum_pg_class_relacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
  
                ReleaseSysCache(tuple);
  
--- 373,379 ----
                replaces[Anum_pg_class_relacl - 1] = 'r';
                values[Anum_pg_class_relacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, 
nulls, replaces);
  
                ReleaseSysCache(tuple);
  
***************
*** 531,537 ****
                replaces[Anum_pg_database_datacl - 1] = 'r';
                values[Anum_pg_database_datacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
  
                simple_heap_update(relation, &newtuple->t_self, newtuple);
  
--- 531,537 ----
                replaces[Anum_pg_database_datacl - 1] = 'r';
                values[Anum_pg_database_datacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, 
nulls, replaces);
  
                simple_heap_update(relation, &newtuple->t_self, newtuple);
  
***************
*** 685,691 ****
                replaces[Anum_pg_proc_proacl - 1] = 'r';
                values[Anum_pg_proc_proacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
  
                ReleaseSysCache(tuple);
  
--- 685,691 ----
                replaces[Anum_pg_proc_proacl - 1] = 'r';
                values[Anum_pg_proc_proacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, 
nulls, replaces);
  
                ReleaseSysCache(tuple);
  
***************
*** 848,854 ****
                replaces[Anum_pg_language_lanacl - 1] = 'r';
                values[Anum_pg_language_lanacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
  
                ReleaseSysCache(tuple);
  
--- 848,854 ----
                replaces[Anum_pg_language_lanacl - 1] = 'r';
                values[Anum_pg_language_lanacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, 
nulls, replaces);
  
                ReleaseSysCache(tuple);
  
***************
*** 1002,1008 ****
                replaces[Anum_pg_namespace_nspacl - 1] = 'r';
                values[Anum_pg_namespace_nspacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
  
                ReleaseSysCache(tuple);
  
--- 1002,1008 ----
                replaces[Anum_pg_namespace_nspacl - 1] = 'r';
                values[Anum_pg_namespace_nspacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, 
nulls, replaces);
  
                ReleaseSysCache(tuple);
  
***************
*** 1160,1166 ****
                replaces[Anum_pg_tablespace_spcacl - 1] = 'r';
                values[Anum_pg_tablespace_spcacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
  
                simple_heap_update(relation, &newtuple->t_self, newtuple);
  
--- 1160,1166 ----
                replaces[Anum_pg_tablespace_spcacl - 1] = 'r';
                values[Anum_pg_tablespace_spcacl - 1] = PointerGetDatum(new_acl);
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(relation), values, 
nulls, replaces);
  
                simple_heap_update(relation, &newtuple->t_self, newtuple);
  
Index: src/backend/catalog/pg_operator.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/catalog/pg_operator.c,v
retrieving revision 1.86
diff -c -r1.86 pg_operator.c
*** src/backend/catalog/pg_operator.c   29 Aug 2004 04:12:29 -0000      1.86
--- src/backend/catalog/pg_operator.c   8 Sep 2004 19:53:08 -0000
***************
*** 637,643 ****
                                 operatorObjectId);
  
                tup = heap_modifytuple(tup,
!                                                          pg_operator_desc,
                                                           values,
                                                           nulls,
                                                           replaces);
--- 637,643 ----
                                 operatorObjectId);
  
                tup = heap_modifytuple(tup,
!                                                          
RelationGetDescr(pg_operator_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
***************
*** 807,813 ****
                                }
  
                                tup = heap_modifytuple(tup,
!                                                                          
pg_operator_desc,
                                                                           values,
                                                                           nulls,
                                                                           replaces);
--- 807,813 ----
                                }
  
                                tup = heap_modifytuple(tup,
!                                                                          
RelationGetDescr(pg_operator_desc),
                                                                           values,
                                                                           nulls,
                                                                           replaces);
***************
*** 832,838 ****
                replaces[Anum_pg_operator_oprcom - 1] = 'r';
  
                tup = heap_modifytuple(tup,
!                                                          pg_operator_desc,
                                                           values,
                                                           nulls,
                                                           replaces);
--- 832,838 ----
                replaces[Anum_pg_operator_oprcom - 1] = 'r';
  
                tup = heap_modifytuple(tup,
!                                                          
RelationGetDescr(pg_operator_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
***************
*** 858,864 ****
                replaces[Anum_pg_operator_oprnegate - 1] = 'r';
  
                tup = heap_modifytuple(tup,
!                                                          pg_operator_desc,
                                                           values,
                                                           nulls,
                                                           replaces);
--- 858,864 ----
                replaces[Anum_pg_operator_oprnegate - 1] = 'r';
  
                tup = heap_modifytuple(tup,
!                                                          
RelationGetDescr(pg_operator_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
Index: src/backend/catalog/pg_proc.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/catalog/pg_proc.c,v
retrieving revision 1.119
diff -c -r1.119 pg_proc.c
*** src/backend/catalog/pg_proc.c       29 Aug 2004 05:06:41 -0000      1.119
--- src/backend/catalog/pg_proc.c       8 Sep 2004 19:54:12 -0000
***************
*** 237,243 ****
                replaces[Anum_pg_proc_proacl - 1] = ' ';
  
                /* Okay, do it... */
!               tup = heap_modifytuple(oldtup, rel, values, nulls, replaces);
                simple_heap_update(rel, &tup->t_self, tup);
  
                ReleaseSysCache(oldtup);
--- 237,243 ----
                replaces[Anum_pg_proc_proacl - 1] = ' ';
  
                /* Okay, do it... */
!               tup = heap_modifytuple(oldtup, RelationGetDescr(rel), values, nulls, 
replaces);
                simple_heap_update(rel, &tup->t_self, tup);
  
                ReleaseSysCache(oldtup);
Index: src/backend/catalog/pg_type.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/catalog/pg_type.c,v
retrieving revision 1.96
diff -c -r1.96 pg_type.c
*** src/backend/catalog/pg_type.c       29 Aug 2004 05:06:41 -0000      1.96
--- src/backend/catalog/pg_type.c       8 Sep 2004 19:54:30 -0000
***************
*** 296,302 ****
                 * Okay to update existing "shell" type tuple
                 */
                tup = heap_modifytuple(tup,
!                                                          pg_type_desc,
                                                           values,
                                                           nulls,
                                                           replaces);
--- 296,302 ----
                 * Okay to update existing "shell" type tuple
                 */
                tup = heap_modifytuple(tup,
!                                                          
RelationGetDescr(pg_type_desc),
                                                           values,
                                                           nulls,
                                                           replaces);
Index: src/backend/commands/analyze.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/analyze.c,v
retrieving revision 1.76
diff -c -r1.76 analyze.c
*** src/backend/commands/analyze.c      29 Aug 2004 05:06:41 -0000      1.76
--- src/backend/commands/analyze.c      8 Sep 2004 19:50:48 -0000
***************
*** 1197,1203 ****
                {
                        /* Yes, replace it */
                        stup = heap_modifytuple(oldtup,
!                                                                       sd,
                                                                        values,
                                                                        nulls,
                                                                        replaces);
--- 1197,1203 ----
                {
                        /* Yes, replace it */
                        stup = heap_modifytuple(oldtup,
!                                                                       
RelationGetDescr(sd),
                                                                        values,
                                                                        nulls,
                                                                        replaces);
Index: src/backend/commands/async.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/async.c,v
retrieving revision 1.115
diff -c -r1.115 async.c
*** src/backend/commands/async.c        29 Aug 2004 05:06:41 -0000      1.115
--- src/backend/commands/async.c        8 Sep 2004 19:52:20 -0000
***************
*** 523,529 ****
                                ItemPointerData ctid;
                                int                     result;
  
!                               rTuple = heap_modifytuple(lTuple, lRel,
                                                                                  
value, nulls, repl);
  
                                /*
--- 523,529 ----
                                ItemPointerData ctid;
                                int                     result;
  
!                               rTuple = heap_modifytuple(lTuple, 
RelationGetDescr(lRel),
                                                                                  
value, nulls, repl);
  
                                /*
***************
*** 926,932 ****
                         * tried to UNLISTEN us, so there can be no uncommitted
                         * changes.
                         */
!                       rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
                        simple_heap_update(lRel, &lTuple->t_self, rTuple);
  
  #ifdef NOT_USED                                       /* currently there are no 
indexes */
--- 926,932 ----
                         * tried to UNLISTEN us, so there can be no uncommitted
                         * changes.
                         */
!                       rTuple = heap_modifytuple(lTuple, RelationGetDescr(lRel), 
value, nulls, repl);
                        simple_heap_update(lRel, &lTuple->t_self, rTuple);
  
  #ifdef NOT_USED                                       /* currently there are no 
indexes */
Index: src/backend/commands/comment.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/comment.c,v
retrieving revision 1.79
diff -c -r1.79 comment.c
*** src/backend/commands/comment.c      29 Aug 2004 05:06:41 -0000      1.79
--- src/backend/commands/comment.c      8 Sep 2004 19:48:21 -0000
***************
*** 203,209 ****
                        simple_heap_delete(description, &oldtuple->t_self);
                else
                {
!                       newtuple = heap_modifytuple(oldtuple, description, values,
                                                                                nulls, 
replaces);
                        simple_heap_update(description, &oldtuple->t_self, newtuple);
                }
--- 203,209 ----
                        simple_heap_delete(description, &oldtuple->t_self);
                else
                {
!                       newtuple = heap_modifytuple(oldtuple, 
RelationGetDescr(description), values,
                                                                                nulls, 
replaces);
                        simple_heap_update(description, &oldtuple->t_self, newtuple);
                }
Index: src/backend/commands/dbcommands.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/dbcommands.c,v
retrieving revision 1.144
diff -c -r1.144 dbcommands.c
*** src/backend/commands/dbcommands.c   30 Aug 2004 03:50:24 -0000      1.144
--- src/backend/commands/dbcommands.c   8 Sep 2004 19:49:08 -0000
***************
*** 777,783 ****
                        repl_null[Anum_pg_database_datconfig - 1] = 'n';
        }
  
!       newtuple = heap_modifytuple(tuple, rel, repl_val, repl_null, repl_repl);
        simple_heap_update(rel, &tuple->t_self, newtuple);
  
        /* Update indexes */
--- 777,783 ----
                        repl_null[Anum_pg_database_datconfig - 1] = 'n';
        }
  
!       newtuple = heap_modifytuple(tuple, RelationGetDescr(rel), repl_val, repl_null, 
repl_repl);
        simple_heap_update(rel, &tuple->t_self, newtuple);
  
        /* Update indexes */
***************
*** 859,865 ****
                        repl_val[Anum_pg_database_datacl - 1] = 
PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tuple, rel, repl_val, repl_null, 
repl_repl);
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
  
--- 859,865 ----
                        repl_val[Anum_pg_database_datacl - 1] = 
PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tuple, RelationGetDescr(rel), repl_val, 
repl_null, repl_repl);
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
  
Index: src/backend/commands/functioncmds.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/functioncmds.c,v
retrieving revision 1.52
diff -c -r1.52 functioncmds.c
*** src/backend/commands/functioncmds.c 29 Aug 2004 05:06:41 -0000      1.52
--- src/backend/commands/functioncmds.c 8 Sep 2004 19:48:38 -0000
***************
*** 793,799 ****
                        repl_val[Anum_pg_proc_proacl - 1] = PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tup, rel, repl_val, repl_null, repl_repl);
  
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
--- 793,799 ----
                        repl_val[Anum_pg_proc_proacl - 1] = PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, 
repl_null, repl_repl);
  
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
Index: src/backend/commands/schemacmds.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/schemacmds.c,v
retrieving revision 1.25
diff -c -r1.25 schemacmds.c
*** src/backend/commands/schemacmds.c   2 Sep 2004 00:22:16 -0000       1.25
--- src/backend/commands/schemacmds.c   8 Sep 2004 19:52:31 -0000
***************
*** 368,374 ****
                        repl_val[Anum_pg_namespace_nspacl - 1] = 
PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tup, rel, repl_val, repl_null, repl_repl);
  
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
--- 368,374 ----
                        repl_val[Anum_pg_namespace_nspacl - 1] = 
PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, 
repl_null, repl_repl);
  
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
Index: src/backend/commands/tablecmds.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/tablecmds.c,v
retrieving revision 1.131
diff -c -r1.131 tablecmds.c
*** src/backend/commands/tablecmds.c    31 Aug 2004 23:27:05 -0000      1.131
--- src/backend/commands/tablecmds.c    8 Sep 2004 19:50:06 -0000
***************
*** 1702,1708 ****
                values[Anum_pg_trigger_tgargs - 1] = PointerGetDatum(newtgargs);
                replaces[Anum_pg_trigger_tgargs - 1] = 'r';
  
!               tuple = heap_modifytuple(tuple, tgrel, values, nulls, replaces);
  
                /*
                 * Update pg_trigger and its indexes
--- 1702,1708 ----
                values[Anum_pg_trigger_tgargs - 1] = PointerGetDatum(newtgargs);
                replaces[Anum_pg_trigger_tgargs - 1] = 'r';
  
!               tuple = heap_modifytuple(tuple, RelationGetDescr(tgrel), values, 
nulls, replaces);
  
                /*
                 * Update pg_trigger and its indexes
***************
*** 5193,5199 ****
                        repl_val[Anum_pg_class_relacl - 1] = PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tuple, class_rel, repl_val, repl_null, 
repl_repl);
  
                simple_heap_update(class_rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(class_rel, newtuple);
--- 5193,5199 ----
                        repl_val[Anum_pg_class_relacl - 1] = PointerGetDatum(newAcl);
                }
  
!               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: src/backend/commands/tablespace.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/tablespace.c,v
retrieving revision 1.11
diff -c -r1.11 tablespace.c
*** src/backend/commands/tablespace.c   30 Aug 2004 02:54:38 -0000      1.11
--- src/backend/commands/tablespace.c   8 Sep 2004 19:48:02 -0000
***************
*** 933,939 ****
                        repl_val[Anum_pg_tablespace_spcacl - 1] = 
PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tup, rel, repl_val, repl_null, repl_repl);
  
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
--- 933,939 ----
                        repl_val[Anum_pg_tablespace_spcacl - 1] = 
PointerGetDatum(newAcl);
                }
  
!               newtuple = heap_modifytuple(tup, RelationGetDescr(rel), repl_val, 
repl_null, repl_repl);
  
                simple_heap_update(rel, &newtuple->t_self, newtuple);
                CatalogUpdateIndexes(rel, newtuple);
Index: src/backend/commands/typecmds.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/typecmds.c,v
retrieving revision 1.63
diff -c -r1.63 typecmds.c
*** src/backend/commands/typecmds.c     29 Aug 2004 05:06:41 -0000      1.63
--- src/backend/commands/typecmds.c     8 Sep 2004 19:49:27 -0000
***************
*** 1230,1236 ****
                new_record_repl[Anum_pg_type_typdefault - 1] = 'r';
        }
  
!       newtuple = heap_modifytuple(tup, rel,
                                                  new_record, new_record_nulls, 
new_record_repl);
  
        simple_heap_update(rel, &tup->t_self, newtuple);
--- 1230,1236 ----
                new_record_repl[Anum_pg_type_typdefault - 1] = 'r';
        }
  
!       newtuple = heap_modifytuple(tup, RelationGetDescr(rel),
                                                  new_record, new_record_nulls, 
new_record_repl);
  
        simple_heap_update(rel, &tup->t_self, newtuple);
Index: src/backend/commands/user.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/commands/user.c,v
retrieving revision 1.144
diff -c -r1.144 user.c
*** src/backend/commands/user.c 29 Aug 2004 05:06:41 -0000      1.144
--- src/backend/commands/user.c 8 Sep 2004 19:51:54 -0000
***************
*** 955,961 ****
                new_record_repl[Anum_pg_shadow_valuntil - 1] = 'r';
        }
  
!       new_tuple = heap_modifytuple(tuple, pg_shadow_rel, new_record,
                                                                 new_record_nulls, 
new_record_repl);
        simple_heap_update(pg_shadow_rel, &tuple->t_self, new_tuple);
  
--- 955,961 ----
                new_record_repl[Anum_pg_shadow_valuntil - 1] = 'r';
        }
  
!       new_tuple = heap_modifytuple(tuple, RelationGetDescr(pg_shadow_rel), 
new_record,
                                                                 new_record_nulls, 
new_record_repl);
        simple_heap_update(pg_shadow_rel, &tuple->t_self, new_tuple);
  
***************
*** 1047,1053 ****
                        repl_null[Anum_pg_shadow_useconfig - 1] = 'n';
        }
  
!       newtuple = heap_modifytuple(oldtuple, rel, repl_val, repl_null, repl_repl);
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
  
        CatalogUpdateIndexes(rel, newtuple);
--- 1047,1053 ----
                        repl_null[Anum_pg_shadow_useconfig - 1] = 'n';
        }
  
!       newtuple = heap_modifytuple(oldtuple, RelationGetDescr(rel), repl_val, 
repl_null, repl_repl);
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
  
        CatalogUpdateIndexes(rel, newtuple);
***************
*** 1274,1280 ****
                                (errmsg("MD5 password cleared because of user 
rename")));
        }
  
!       newtuple = heap_modifytuple(oldtuple, rel, repl_val, repl_null, repl_repl);
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
  
        CatalogUpdateIndexes(rel, newtuple);
--- 1274,1280 ----
                                (errmsg("MD5 password cleared because of user 
rename")));
        }
  
!       newtuple = heap_modifytuple(oldtuple, RelationGetDescr(rel), repl_val, 
repl_null, repl_repl);
        simple_heap_update(rel, &oldtuple->t_self, newtuple);
  
        CatalogUpdateIndexes(rel, newtuple);
***************
*** 1669,1675 ****
        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,
                                                  new_record, new_record_nulls, 
new_record_repl);
  
        simple_heap_update(group_rel, &group_tuple->t_self, tuple);
--- 1669,1675 ----
        new_record[Anum_pg_group_grolist - 1] = PointerGetDatum(newarray);
        new_record_repl[Anum_pg_group_grolist - 1] = 'r';
  
!       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: src/backend/rewrite/rewriteDefine.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/rewrite/rewriteDefine.c,v
retrieving revision 1.98
diff -c -r1.98 rewriteDefine.c
*** src/backend/rewrite/rewriteDefine.c 29 Aug 2004 05:06:47 -0000      1.98
--- src/backend/rewrite/rewriteDefine.c 8 Sep 2004 19:47:08 -0000
***************
*** 114,120 ****
                replaces[Anum_pg_rewrite_ev_qual - 1] = 'r';
                replaces[Anum_pg_rewrite_ev_action - 1] = 'r';
  
!               tup = heap_modifytuple(oldtup, pg_rewrite_desc,
                                                           values, nulls, replaces);
  
                simple_heap_update(pg_rewrite_desc, &tup->t_self, tup);
--- 114,120 ----
                replaces[Anum_pg_rewrite_ev_qual - 1] = 'r';
                replaces[Anum_pg_rewrite_ev_action - 1] = 'r';
  
!               tup = heap_modifytuple(oldtup, RelationGetDescr(pg_rewrite_desc),
                                                           values, nulls, replaces);
  
                simple_heap_update(pg_rewrite_desc, &tup->t_self, tup);
Index: src/backend/storage/large_object/inv_api.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/backend/storage/large_object/inv_api.c,v
retrieving revision 1.106
diff -c -r1.106 inv_api.c
*** src/backend/storage/large_object/inv_api.c  29 Aug 2004 05:06:48 -0000      1.106
--- src/backend/storage/large_object/inv_api.c  8 Sep 2004 19:47:39 -0000
***************
*** 570,576 ****
                        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,
                                                                          values, 
nulls, replace);
                        simple_heap_update(lo_heap_r, &newtup->t_self, newtup);
                        CatalogIndexInsert(indstate, newtup);
--- 570,576 ----
                        memset(replace, ' ', sizeof(replace));
                        values[Anum_pg_largeobject_data - 1] = 
PointerGetDatum(&workbuf);
                        replace[Anum_pg_largeobject_data - 1] = '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: src/include/access/heapam.h
===================================================================
RCS file: /home/alvherre/cvs/pgsql-server/src/include/access/heapam.h,v
retrieving revision 1.92
diff -c -r1.92 heapam.h
*** src/include/access/heapam.h 29 Aug 2004 05:06:55 -0000      1.92
--- src/include/access/heapam.h 8 Sep 2004 19:43:06 -0000
***************
*** 196,202 ****
  extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
                           Datum *values, char *nulls);
  extern HeapTuple heap_modifytuple(HeapTuple tuple,
!                                Relation relation,
                                 Datum *replValues,
                                 char *replNulls,
                                 char *replActions);
--- 196,202 ----
  extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
                           Datum *values, char *nulls);
  extern HeapTuple heap_modifytuple(HeapTuple tuple,
!                                TupleDesc tupleDesc,
                                 Datum *replValues,
                                 char *replNulls,
                                 char *replActions);
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to