*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.10 1997/01/10 20:17:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.11 1997/04/22 03:32:35 vadim Exp $
*
*-------------------------------------------------------------------------
*/
int *lIndex;
char *dataPtr;
- execConstByVal = arrayRef->refelembyval;
*isNull = false;
array_scanner = (ArrayType*)ExecEvalExpr(arrayRef->refexpr,
econtext,
assgnexpr, econtext,
isNull, &dummy);
if (*isNull) return (Datum)NULL;
+ execConstByVal = arrayRef->refelembyval;
+ execConstLen = arrayRef->refelemlength;
if (lIndex == NULL)
return (Datum) array_set(array_scanner, i, upper.indx, dataPtr,
arrayRef->refelembyval,
arrayRef->refelembyval,
arrayRef->refelemlength, isNull);
}
+ execConstByVal = arrayRef->refelembyval;
+ execConstLen = arrayRef->refelemlength;
if (lIndex == NULL)
return (Datum) array_ref(array_scanner, i, upper.indx,
arrayRef->refelembyval,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.7 1996/11/06 06:47:40 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.8 1997/04/22 03:32:38 vadim Exp $
*
*-------------------------------------------------------------------------
*/
/* ----------------
* Get the join attribute value of the tuple
* ----------------
+ * ...It's quick hack - use ExecEvalExpr instead of ExecEvalVar:
+ * hashkey may be T_ArrayRef, not just T_Var. - vadim 04/22/97
*/
- keyval = ExecEvalVar(hashkey, econtext, &isNull);
+ keyval = ExecEvalExpr((Node*)hashkey, econtext, &isNull, NULL);
/*
* keyval could be null, so we better point it to something
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.9 1997/03/18 18:40:05 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.10 1997/04/22 03:30:36 vadim Exp $
*
*-------------------------------------------------------------------------
*/
Expr *temp = NULL;
List *i = NIL;
Expr *clause;
+ Node *op;
foreach(i,clauses) {
clause = lfirst(i);
- if(var_is_outer(get_rightop(clause))) {
+ op = (Node*)get_rightop(clause);
+ if ( IsA (op, ArrayRef) )
+ op = ((ArrayRef*)op)->refexpr;
+ Assert ( IsA (op, Var) );
+ if ( var_is_outer ((Var*)op) )
+ {
temp = make_clause(clause->opType, clause->oper,
lcons(get_rightop(clause),
lcons(get_leftop(clause),