|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.50 2000/04/12 17:15:54 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.51 2000/06/06 17:02:38 tgl Exp $ |
12 | 12 | * |
13 | 13 | * NOTES |
14 | 14 | * These routines allow the parser/planner/executor to perform |
@@ -456,8 +456,10 @@ InitCatalogCache() |
456 | 456 | /* |
457 | 457 | * SearchSysCacheTupleCopy |
458 | 458 | * |
459 | | - *This is like SearchSysCacheTuple, except it returns a copy of the tuple |
460 | | - *that the user is required to pfree(). |
| 459 | + *This is like SearchSysCacheTuple, except it returns a palloc'd copy of |
| 460 | + *the tuple. The caller should heap_freetuple() the returned copy when |
| 461 | + *done with it. This routine should be used when the caller intends to |
| 462 | + *continue to access the tuple for more than a very short period of time. |
461 | 463 | */ |
462 | 464 | HeapTuple |
463 | 465 | SearchSysCacheTupleCopy(intcacheId,/* cache selection code */ |
@@ -485,7 +487,11 @@ SearchSysCacheTupleCopy(int cacheId,/* cache selection code */ |
485 | 487 | *Returns the cache copy of the tuple if one is found, NULL if not. |
486 | 488 | *The tuple is the 'cache' copy. |
487 | 489 | * |
488 | | - *XXX The tuple that is returned is NOT supposed to be pfree'd! |
| 490 | + *CAUTION: The tuple that is returned must NOT be freed by the caller! |
| 491 | + * |
| 492 | + *CAUTION: The returned tuple may be flushed from the cache during |
| 493 | + *subsequent cache lookup operations, or by shared cache invalidation. |
| 494 | + *Callers should not expect the pointer to remain valid for long. |
489 | 495 | */ |
490 | 496 | HeapTuple |
491 | 497 | SearchSysCacheTuple(intcacheId,/* cache selection code */ |
|