Add a comment noting that heap_copytuple_with_tuple() results in a
authorNeil Conway <neilc@samurai.com>
Thu, 23 Nov 2006 05:27:18 +0000 (05:27 +0000)
committerNeil Conway <neilc@samurai.com>
Thu, 23 Nov 2006 05:27:18 +0000 (05:27 +0000)
HeapTuple that is no longer allocated as a single palloc() block; if
used carelessly, this might result in a subsequent memory leak after
heap_freetuple().

src/backend/access/common/heaptuple.c

index a1c25c87caa36aa666eef9ef75db64a7c666112d..1ef62c7069b31908e21e7ce715ce0371620aff12 100644 (file)
@@ -631,6 +631,9 @@ heap_copytuple(HeapTuple tuple)
  *             heap_copytuple_with_tuple
  *
  *             copy a tuple into a caller-supplied HeapTuple management struct
+ *
+ * Note that after calling this function, the "dest" HeapTuple will not be
+ * allocated as a single palloc() block (unlike with heap_copytuple()).
  * ----------------
  */
 void