|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.57 1999/10/30 23:10:21 tgl Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.58 1999/11/07 23:07:52 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *
|
13 | 13 | * INTERFACE ROUTINES
|
@@ -259,7 +259,7 @@ heapgettup(Relation relation,
|
259 | 259 | elog(DEBUG, "heapgettup(..., b=0x%x, nkeys=%d, key=0x%x", buffer, nkeys, key);
|
260 | 260 |
|
261 | 261 | elog(DEBUG, "heapgettup: relation(%c)=`%s', %p",
|
262 |
| - relation->rd_rel->relkind, &relation->rd_rel->relname, |
| 262 | + relation->rd_rel->relkind, RelationGetRelationName(relation), |
263 | 263 | snapshot);
|
264 | 264 | #endif /* !defined(HEAPDEBUGALL) */
|
265 | 265 |
|
@@ -525,7 +525,7 @@ heap_open(Oid relationId, LOCKMODE lockmode)
|
525 | 525 |
|
526 | 526 | /* Under no circumstances will we return an index as a relation. */
|
527 | 527 | if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
|
528 |
| - elog(ERROR, "%s is an index relation", r->rd_rel->relname.data); |
| 528 | + elog(ERROR, "%s is an index relation", RelationGetRelationName(r)); |
529 | 529 |
|
530 | 530 | if (lockmode == NoLock)
|
531 | 531 | return r; /* caller must check RelationIsValid! */
|
@@ -567,7 +567,7 @@ heap_openr(char *relationName, LOCKMODE lockmode)
|
567 | 567 |
|
568 | 568 | /* Under no circumstances will we return an index as a relation. */
|
569 | 569 | if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
|
570 |
| - elog(ERROR, "%s is an index relation", r->rd_rel->relname.data); |
| 570 | + elog(ERROR, "%s is an index relation", RelationGetRelationName(r)); |
571 | 571 |
|
572 | 572 | if (lockmode == NoLock)
|
573 | 573 | return r; /* caller must check RelationIsValid! */
|
@@ -765,7 +765,7 @@ heap_endscan(HeapScanDesc scan)
|
765 | 765 | #ifdef HEAPDEBUGALL
|
766 | 766 | #define HEAPDEBUG_1 \
|
767 | 767 | elog(DEBUG, "heap_getnext([%s,nkeys=%d],backw=%d) called", \
|
768 |
| - scan->rs_rd->rd_rel->relname.data, scan->rs_nkeys, backw) |
| 768 | + RelationGetRelationName(scan->rs_rd), scan->rs_nkeys, backw) |
769 | 769 |
|
770 | 770 | #define HEAPDEBUG_2 \
|
771 | 771 | elog(DEBUG, "heap_getnext called with backw (no tracing yet)")
|
@@ -1045,7 +1045,7 @@ heap_fetch(Relation relation,
|
1045 | 1045 |
|
1046 | 1046 | if (!BufferIsValid(buffer))
|
1047 | 1047 | elog(ERROR, "heap_fetch: %s relation: ReadBuffer(%lx) failed",
|
1048 |
| - &relation->rd_rel->relname, (long) tid); |
| 1048 | + RelationGetRelationName(relation), (long) tid); |
1049 | 1049 |
|
1050 | 1050 | LockBuffer(buffer, BUFFER_LOCK_SHARE);
|
1051 | 1051 |
|
@@ -1121,7 +1121,7 @@ heap_get_latest_tid(Relation relation,
|
1121 | 1121 |
|
1122 | 1122 | if (!BufferIsValid(buffer))
|
1123 | 1123 | elog(ERROR, "heap_get_latest_tid: %s relation: ReadBuffer(%lx) failed",
|
1124 |
| - &relation->rd_rel->relname, (long) tid); |
| 1124 | + RelationGetRelationName(relation), (long) tid); |
1125 | 1125 |
|
1126 | 1126 | LockBuffer(buffer, BUFFER_LOCK_SHARE);
|
1127 | 1127 |
|
@@ -1231,7 +1231,7 @@ heap_insert(Relation relation, HeapTuple tup)
|
1231 | 1231 |
|
1232 | 1232 | RelationPutHeapTupleAtEnd(relation, tup);
|
1233 | 1233 |
|
1234 |
| - if (IsSystemRelationName(RelationGetRelationName(relation)->data)) |
| 1234 | + if (IsSystemRelationName(RelationGetRelationName(relation))) |
1235 | 1235 | RelationInvalidateHeapTuple(relation, tup);
|
1236 | 1236 |
|
1237 | 1237 | return tup->t_data->t_oid;
|
|
0 commit comments