summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeAgg.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-06-28 03:33:33 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-06-28 03:33:33 +0000
commit1aebc3618a0be13451918581ad390ad9a3518702 (patch)
treee8ab228245c43ff086bd8e9d65baf3d1d9a5f96a /src/backend/executor/nodeAgg.c
parentb601c8d8828ee02ffb195dead82b233b9572fe32 (diff)
downloadpostgresql-1aebc3618a0be13451918581ad390ad9a3518702.tar.gz
First phase of memory management rewrite (see backend/utils/mmgr/README
for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r--src/backend/executor/nodeAgg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index c9d6299f49..0289cf45bd 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -32,7 +32,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.67 2000/06/15 03:32:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.68 2000/06/28 03:31:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -265,7 +265,7 @@ advance_transition_functions(AggStatePerAgg peraggstate,
else
newVal = FunctionCallInvoke(&fcinfo);
if (!peraggstate->transtype1ByVal && !peraggstate->value1IsNull)
- pfree(peraggstate->value1);
+ pfree(DatumGetPointer(peraggstate->value1));
peraggstate->value1 = newVal;
peraggstate->value1IsNull = fcinfo.isnull;
}
@@ -288,7 +288,7 @@ advance_transition_functions(AggStatePerAgg peraggstate,
else
newVal = FunctionCallInvoke(&fcinfo);
if (!peraggstate->transtype2ByVal && !peraggstate->value2IsNull)
- pfree(peraggstate->value2);
+ pfree(DatumGetPointer(peraggstate->value2));
peraggstate->value2 = newVal;
peraggstate->value2IsNull = fcinfo.isnull;
}
@@ -424,12 +424,12 @@ finalize_aggregate(AggStatePerAgg peraggstate,
if (OidIsValid(peraggstate->xfn1_oid) &&
!peraggstate->value1IsNull &&
!peraggstate->transtype1ByVal)
- pfree(peraggstate->value1);
+ pfree(DatumGetPointer(peraggstate->value1));
if (OidIsValid(peraggstate->xfn2_oid) &&
!peraggstate->value2IsNull &&
!peraggstate->transtype2ByVal)
- pfree(peraggstate->value2);
+ pfree(DatumGetPointer(peraggstate->value2));
}
/* ---------------------------------------