mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
heapattr functions now return a Datum, not char *.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.17 1997/09/08 21:47:17 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.18 1997/09/12 04:08:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -472,7 +472,7 @@ inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
|
||||
}
|
||||
|
||||
/* copy the data from this block into the buffer */
|
||||
d = (Datum) heap_getattr(htup, b, 2, obj_desc->hdesc, &isNull);
|
||||
d = heap_getattr(htup, b, 2, obj_desc->hdesc, &isNull);
|
||||
fsblock = (struct varlena *) DatumGetPointer(d);
|
||||
|
||||
off = obj_desc->offset - obj_desc->lowbyte;
|
||||
@@ -648,9 +648,9 @@ inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *bufP)
|
||||
* return the tuple.
|
||||
*/
|
||||
|
||||
d = (Datum) heap_getattr(htup, *bufP, 1, obj_desc->hdesc, &isNull);
|
||||
d = heap_getattr(htup, *bufP, 1, obj_desc->hdesc, &isNull);
|
||||
lastbyte = (int32) DatumGetInt32(d);
|
||||
d = (Datum) heap_getattr(htup, *bufP, 2, obj_desc->hdesc, &isNull);
|
||||
d = heap_getattr(htup, *bufP, 2, obj_desc->hdesc, &isNull);
|
||||
fsblock = (struct varlena *) DatumGetPointer(d);
|
||||
|
||||
/*
|
||||
@@ -817,7 +817,7 @@ inv_wrold(LargeObjectDesc *obj_desc,
|
||||
newpage = BufferGetPage(newbuf);
|
||||
hr = obj_desc->heap_r;
|
||||
freespc = IFREESPC(page);
|
||||
d = (Datum) heap_getattr(htup, buffer, 2, obj_desc->hdesc, &isNull);
|
||||
d = heap_getattr(htup, buffer, 2, obj_desc->hdesc, &isNull);
|
||||
fsblock = (struct varlena *) DatumGetPointer(d);
|
||||
tupbytes = fsblock->vl_len - sizeof(fsblock->vl_len);
|
||||
|
||||
@@ -1218,7 +1218,7 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
|
||||
index_endscan(iscan);
|
||||
|
||||
/* get olastbyte attribute */
|
||||
d = (Datum) heap_getattr(htup, buf, 1, hdesc, &isNull);
|
||||
d = heap_getattr(htup, buf, 1, hdesc, &isNull);
|
||||
size = DatumGetInt32(d) + 1;
|
||||
|
||||
/* wei hates it if you forget to do this */
|
||||
|
||||
Reference in New Issue
Block a user