aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-12-16 16:26:21 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-12-16 16:26:21 +0000
commite581c04879832e371c322b331a6fad41ffca6916 (patch)
tree2465245b293ea9e18fee7a1e7bafd926dc701d9c /src/backend/access/heap/heapam.c
parent7ae3c0f67baf23ff781f7fd990a1abf3005408be (diff)
downloadpostgresql-e581c04879832e371c322b331a6fad41ffca6916.tar.gz
postgresql-e581c04879832e371c322b331a6fad41ffca6916.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/backend/access/heap/heapam.c')
-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 aade7a29c13..d6a04122cfc 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.222.2.2 2008/03/04 19:54:23 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.222.2.3 2008/12/16 16:26:21 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -2058,6 +2058,7 @@ l2:
HeapTupleHeaderSetCmin(newtup->t_data, cid);
HeapTupleHeaderSetXmax(newtup->t_data, 0); /* zero out Datum fields */
HeapTupleHeaderSetCmax(newtup->t_data, 0); /* for cleanliness */
+ newtup->t_tableOid = RelationGetRelid(relation);
/*
* If the toaster needs to be activated, OR if the new tuple will not fit