File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/backend/utils/adt/trigfuncs.c,v 1.3 2008/11/05 18:49:27 adunstan Exp $
10
+ * $PostgreSQL: pgsql/src/backend/utils/adt/trigfuncs.c,v 1.4 2008/11/05 19:15:15 adunstan Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -62,11 +62,10 @@ suppress_redundant_updates_trigger(PG_FUNCTION_ARGS)
62
62
newheader = newtuple -> t_data ;
63
63
oldheader = oldtuple -> t_data ;
64
64
65
- if (oldheader -> t_infomask & HEAP_HASOID )
66
- {
67
- Oid oldoid = HeapTupleHeaderGetOid (oldheader );
68
- HeapTupleHeaderSetOid (newheader , oldoid );
69
- }
65
+ if (trigdata -> tg_relation -> rd_rel -> relhasoids &&
66
+ !OidIsValid (HeapTupleHeaderGetOid (newheader )))
67
+ HeapTupleHeaderSetOid (newheader , HeapTupleHeaderGetOid (oldheader ));
68
+
70
69
71
70
/* if the tuple payload is the same ... */
72
71
if (newtuple -> t_len == oldtuple -> t_len &&
You can’t perform that action at this time.
0 commit comments