mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Added code so SubLinks make it to optimizer.
This commit is contained in:
parent
588867bd7b
commit
3d24e75176
@ -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)
|
|||||||
{
|
{
|
||||||
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)
|
|||||||
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 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* 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:
|
|||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user