aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execExprInterp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/execExprInterp.c')
-rw-r--r--src/backend/executor/execExprInterp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index 1f9f583cfbb..ec4a2506f15 100644
--- a/src/backend/executor/execExprInterp.c
+++ b/src/backend/executor/execExprInterp.c
@@ -1875,11 +1875,11 @@ CheckOpSlotCompatibility(ExprEvalStep *op, TupleTableSlot *slot)
* Should probably fixed at some point, but for now it's easier to allow
* buffer and heap tuples to be used interchangably.
*/
- if (slot->tts_ops == &TTSOpsBufferTuple &&
+ if (slot->tts_ops == &TTSOpsBufferHeapTuple &&
op->d.fetch.kind == &TTSOpsHeapTuple)
return;
if (slot->tts_ops == &TTSOpsHeapTuple &&
- op->d.fetch.kind == &TTSOpsBufferTuple)
+ op->d.fetch.kind == &TTSOpsBufferHeapTuple)
return;
/*
@@ -4025,15 +4025,15 @@ void
ExecEvalSysVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext,
TupleTableSlot *slot)
{
- bool success;
+ Datum d;
/* slot_getsysattr has sufficient defenses against bad attnums */
- success = slot_getsysattr(slot,
- op->d.var.attnum,
- op->resvalue,
- op->resnull);
+ d = slot_getsysattr(slot,
+ op->d.var.attnum,
+ op->resnull);
+ *op->resvalue = d;
/* this ought to be unreachable, but it's cheap enough to check */
- if (unlikely(!success))
+ if (unlikely(*op->resnull))
elog(ERROR, "failed to fetch attribute from slot");
}