mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
Parser cleanup for expr and subqueries.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.100 1998/02/01 19:43:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.101 1998/02/03 01:53:14 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@ -3330,6 +3330,16 @@ a_expr: attr opt_indirection
|
||||
n->subselect = $5;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
| a_expr Op '(' SubSelect ')'
|
||||
{
|
||||
SubLink *n = makeNode(SubLink);
|
||||
n->lefthand = lcons($1, NULL);
|
||||
n->oper = lcons($2,NIL);
|
||||
n->useor = false;
|
||||
n->subLinkType = ALL_SUBLINK;
|
||||
n->subselect = $4;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
| a_expr AND a_expr
|
||||
{ $$ = makeA_Expr(AND, NULL, $1, $3); }
|
||||
| a_expr OR a_expr
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.14 1998/02/01 22:20:39 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.15 1998/02/03 01:53:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -101,7 +101,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
|
||||
Value *val = &con->val;
|
||||
|
||||
if (con->typename != NULL)
|
||||
result = parser_typecast(val, con->typename, 0);
|
||||
result = parser_typecast(val, con->typename, -1);
|
||||
else
|
||||
result = (Node *) make_const(val);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user