1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

Fix for Hash and arrays

This commit is contained in:
Vadim B. Mikheev
1997-04-22 03:32:38 +00:00
parent 435b9ed2f2
commit 051b4210e3
3 changed files with 17 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -734,10 +734,16 @@ switch_outer(List *clauses)
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),