Commit 3d24e751 authored by Bruce Momjian's avatar Bruce Momjian

Added code so SubLinks make it to optimizer.

parent 588867bd
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.8 1998/01/19 05:06:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.9 1998/01/19 05:48:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -277,12 +277,14 @@ transformExpr(ParseState *pstate, Node *expr, int precedence) ...@@ -277,12 +277,14 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
{ {
Node *lexpr = transformExpr(pstate, lfirst(elist), precedence); Node *lexpr = transformExpr(pstate, lfirst(elist), precedence);
Node *rexpr = lfirst(right_expr); Node *rexpr = lfirst(right_expr);
TargetEntry *tent = (TargetEntry *)rexpr;
Expr *op_expr; Expr *op_expr;
op_expr = make_op(op, lexpr, rexpr); op_expr = make_op(op, lexpr, tent->expr);
sublink->oper = lappend(sublink->oper, op_expr->oper); sublink->oper = lappend(sublink->oper, op_expr->oper);
right_expr = lnext(right_expr); right_expr = lnext(right_expr);
} }
result = (Node *) expr;
} }
break; break;
} }
...@@ -382,6 +384,9 @@ exprType(Node *expr) ...@@ -382,6 +384,9 @@ exprType(Node *expr)
case T_Param: case T_Param:
type = ((Param *) expr)->paramtype; type = ((Param *) expr)->paramtype;
break; break;
case T_SubLink:
type = BOOLOID;
break;
case T_Ident: case T_Ident:
/* is this right? */ /* is this right? */
type = UNKNOWNOID; type = UNKNOWNOID;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.17 1998/01/17 23:33:14 scrappy Exp $ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.18 1998/01/19 05:48:55 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -315,7 +315,7 @@ again: ...@@ -315,7 +315,7 @@ again:
slock_t _res; \ slock_t _res; \
do \ do \
{ \ { \
__asm__("lock xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(0x1)); \ __asm__("xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(0x1)); \
} while (_res != 0); \ } while (_res != 0); \
} while (0) } while (0)
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment