diff options
author | Tom Lane | 2008-12-16 16:26:08 +0000 |
---|---|---|
committer | Tom Lane | 2008-12-16 16:26:08 +0000 |
commit | b546aef49abe4a25683b3c99ffe48f4a12d002b1 (patch) | |
tree | 7000dd4ccf62b7f76584a9a9f4587f50155758b4 | |
parent | 8874a7b66eb907fcc5f6801d88e6fa8b574f0c21 (diff) |
Make heap_update() set newtup->t_tableOid correctly, for consistency with
the other major heapam.c functions. The only known consequence of this
omission is that UPDATE RETURNING failed to return the correct value for
"tableoid", as per report from KaiGai Kohei.
Back-patch to 8.2. Arguably it's wrong all the way back; but without
evidence of visible breakage before RETURNING was added, I'll desist from
patching the older branches.
-rw-r--r-- | src/backend/access/heap/heapam.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 61b562d59c..610254bbc2 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -2604,6 +2604,7 @@ l2: HeapTupleHeaderSetXmin(newtup->t_data, xid); HeapTupleHeaderSetCmin(newtup->t_data, cid); HeapTupleHeaderSetXmax(newtup->t_data, 0); /* for cleanliness */ + newtup->t_tableOid = RelationGetRelid(relation); /* * Replace cid with a combo cid if necessary. Note that we already put |