diff options
author | Neil Conway <neilc@samurai.com> | 2006-11-23 05:27:18 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2006-11-23 05:27:18 +0000 |
commit | 546d6848ca708df79e3530ccd001b50ad77c4175 (patch) | |
tree | 3a8211f98f5623b6fbddbe04c13ce5663c0dc710 | |
parent | 0c6f167c4a59b87d17462bd1ec3b7c7ac0f0c1d5 (diff) | |
download | postgresql-546d6848ca708df79e3530ccd001b50ad77c4175.tar.gz |
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().
-rw-r--r-- | src/backend/access/common/heaptuple.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index d0f4b3d382..608f9c867a 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -16,7 +16,7 @@ * * * 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) * 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 |