Commit 546d6848 authored by Neil Conway's avatar Neil Conway

Add a comment noting that heap_copytuple_with_tuple() results in a

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().
parent 0c6f167c
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.111 2006/10/04 00:29:47 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.112 2006/11/23 05:27:18 neilc Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -631,6 +631,9 @@ heap_copytuple(HeapTuple tuple) ...@@ -631,6 +631,9 @@ heap_copytuple(HeapTuple tuple)
* heap_copytuple_with_tuple * heap_copytuple_with_tuple
* *
* copy a tuple into a caller-supplied HeapTuple management struct * 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 void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment