aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-12-16 16:26:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-12-16 16:26:08 +0000
commitfc3297d828645bcf6447b8cdb2d5b99cff19be9e (patch)
treeeeb78cbd25f06abc52a2e4aa4e7f72c0ffe43535 /src
parent04ecc64310477f57c144e45e44b8ff667783799c (diff)
downloadpostgresql-fc3297d828645bcf6447b8cdb2d5b99cff19be9e.tar.gz
postgresql-fc3297d828645bcf6447b8cdb2d5b99cff19be9e.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/heapam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index c561e8f960b..f58de0f752a 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.271 2008/12/03 13:05:22 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.272 2008/12/16 16:26:08 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -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