mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Reversed out Massimo patch.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.52 1999/06/12 14:05:36 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.53 1999/06/12 14:07:20 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The old interface functions have been converted to macros
|
||||
@ -27,11 +27,6 @@
|
||||
#include <storage/bufpage.h>
|
||||
#include <utils/memutils.h>
|
||||
|
||||
#ifdef FREE_TUPLE_MEMORY
|
||||
#include <utils/portal.h>
|
||||
#include <utils/trace.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#include <regex/utils.h>
|
||||
#else
|
||||
@ -98,9 +93,6 @@ DataFill(char *data,
|
||||
int i;
|
||||
int numberOfAttributes = tupleDesc->natts;
|
||||
Form_pg_attribute *att = tupleDesc->attrs;
|
||||
#ifdef FREE_TUPLE_MEMORY
|
||||
bool free_tuple_memory = pg_options[OPT_FREE_TUPLE_MEMORY];
|
||||
#endif
|
||||
|
||||
if (bit != NULL)
|
||||
{
|
||||
@ -139,14 +131,6 @@ DataFill(char *data,
|
||||
*infomask |= HEAP_HASVARLENA;
|
||||
data_length = VARSIZE(DatumGetPointer(value[i]));
|
||||
memmove(data, DatumGetPointer(value[i]), data_length);
|
||||
#ifdef FREE_TUPLE_MEMORY
|
||||
/* try to pfree value[i] - dz */
|
||||
if (free_tuple_memory &&
|
||||
PortalHeapMemoryIsValid(CurrentMemoryContext,
|
||||
(Pointer) value[i])) {
|
||||
pfree(value[i]);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case sizeof(char):
|
||||
*data = att[i]->attbyval ?
|
||||
@ -163,15 +147,8 @@ DataFill(char *data,
|
||||
*((int32 *) value[i]));
|
||||
break;
|
||||
default:
|
||||
memmove(data, DatumGetPointer(value[i]), att[i]->attlen);
|
||||
#ifdef FREE_TUPLE_MEMORY
|
||||
/* try to pfree value[i] - dz */
|
||||
if (free_tuple_memory &&
|
||||
PortalHeapMemoryIsValid(CurrentMemoryContext,
|
||||
(Pointer) value[i])) {
|
||||
pfree(value[i]);
|
||||
}
|
||||
#endif
|
||||
memmove(data, DatumGetPointer(value[i]),
|
||||
att[i]->attlen);
|
||||
break;
|
||||
}
|
||||
data = (char *) att_addlength((long) data, att[i]->attlen, value[i]);
|
||||
|
Reference in New Issue
Block a user