Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0db527c

Browse files
committed
change fix for suppress_redundant_updates_trigger() where relation has Oids, to only apply if present Oid is invalid, per second thought from TGL
1 parentb65ebc7 commit0db527c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎src/backend/utils/adt/trigfuncs.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/trigfuncs.c,v 1.3 2008/11/0518:49:27 adunstan Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/trigfuncs.c,v 1.4 2008/11/0519:15:15 adunstan Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -62,11 +62,10 @@ suppress_redundant_updates_trigger(PG_FUNCTION_ARGS)
6262
newheader=newtuple->t_data;
6363
oldheader=oldtuple->t_data;
6464

65-
if (oldheader->t_infomask&HEAP_HASOID)
66-
{
67-
Oidoldoid=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+
7069

7170
/* if the tuple payload is the same ... */
7271
if (newtuple->t_len==oldtuple->t_len&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp