1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

heapattr functions now return a Datum, not char *.

This commit is contained in:
Bruce Momjian
1997-09-12 04:09:08 +00:00
parent 6e04b4b20f
commit 1ea01720d5
28 changed files with 177 additions and 188 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.13 1997/09/08 21:48:45 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.14 1997/09/12 04:08:28 momjian Exp $
*
* Notes:
* XXX This needs to use exception.h to handle recovery when
@ -387,40 +387,40 @@ CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
cacheInOutP->cc_skey[3].sk_argument =
(cacheInOutP->cc_key[3] == ObjectIdAttributeNumber)
? (Datum) tuple->t_oid
: (Datum) fastgetattr(tuple,
cacheInOutP->cc_key[3],
RelationGetTupleDescriptor(relation),
&isNull);
: fastgetattr(tuple,
cacheInOutP->cc_key[3],
RelationGetTupleDescriptor(relation),
&isNull);
Assert(!isNull);
/* FALLTHROUGH */
case 3:
cacheInOutP->cc_skey[2].sk_argument =
(cacheInOutP->cc_key[2] == ObjectIdAttributeNumber)
? (Datum) tuple->t_oid
: (Datum) fastgetattr(tuple,
cacheInOutP->cc_key[2],
RelationGetTupleDescriptor(relation),
&isNull);
: fastgetattr(tuple,
cacheInOutP->cc_key[2],
RelationGetTupleDescriptor(relation),
&isNull);
Assert(!isNull);
/* FALLTHROUGH */
case 2:
cacheInOutP->cc_skey[1].sk_argument =
(cacheInOutP->cc_key[1] == ObjectIdAttributeNumber)
? (Datum) tuple->t_oid
: (Datum) fastgetattr(tuple,
cacheInOutP->cc_key[1],
RelationGetTupleDescriptor(relation),
&isNull);
: fastgetattr(tuple,
cacheInOutP->cc_key[1],
RelationGetTupleDescriptor(relation),
&isNull);
Assert(!isNull);
/* FALLTHROUGH */
case 1:
cacheInOutP->cc_skey[0].sk_argument =
(cacheInOutP->cc_key[0] == ObjectIdAttributeNumber)
? (Datum) tuple->t_oid
: (Datum) fastgetattr(tuple,
cacheInOutP->cc_key[0],
RelationGetTupleDescriptor(relation),
&isNull);
: fastgetattr(tuple,
cacheInOutP->cc_key[0],
RelationGetTupleDescriptor(relation),
&isNull);
Assert(!isNull);
break;
default:

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.7 1997/09/08 21:48:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.8 1997/09/12 04:08:35 momjian Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@ -494,7 +494,7 @@ SearchSysCacheGetAttribute(int cacheId,
int32 attributeLength,
attributeByValue;
bool isNull;
char *attributeValue;
Datum attributeValue;
void *returnValue;
tp = SearchSysCacheTuple(cacheId, key1, key2, key3, key4);
@ -562,7 +562,7 @@ SearchSysCacheGetAttribute(int cacheId,
: attributeLength; /* fixed length */
tmp = (char *) palloc(size);
memmove(tmp, attributeValue, size);
memmove(tmp, (void *)attributeValue, size);
returnValue = (void *) tmp;
}