|
11 | 11 | * |
12 | 12 | * |
13 | 13 | * IDENTIFICATION |
14 | | - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.251 2001/09/18 01:59:06 tgl Exp $ |
| 14 | + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.252 2001/09/20 14:20:27 petere Exp $ |
15 | 15 | * |
16 | 16 | * HISTORY |
17 | 17 | * AUTHORDATEMAJOR EVENT |
@@ -89,7 +89,6 @@ static void insertSelectOptions(SelectStmt *stmt, |
89 | 89 | List *sortClause, List *forUpdate, |
90 | 90 | Node *limitOffset, Node *limitCount); |
91 | 91 | static Node *makeSetOp(SetOperation op,bool all, Node *larg, Node *rarg); |
92 | | -staticboolexprIsNullConstant(Node *arg); |
93 | 92 | static Node *doNegate(Node *n); |
94 | 93 | staticvoiddoNegateFloat(Value *v); |
95 | 94 |
|
@@ -4465,29 +4464,7 @@ a_expr: c_expr |
4465 | 4464 | |a_expr'>'a_expr |
4466 | 4465 | {$$ = makeA_Expr(OP,">",$1,$3); } |
4467 | 4466 | |a_expr'='a_expr |
4468 | | -{ |
4469 | | -/* |
4470 | | - * Special-case "foo = NULL" and "NULL = foo" for |
4471 | | - * compatibility with standards-broken products |
4472 | | - * (like Microsoft's). Turn these into IS NULL exprs. |
4473 | | -*/ |
4474 | | -if (exprIsNullConstant($3)) |
4475 | | -{ |
4476 | | -NullTest *n = makeNode(NullTest); |
4477 | | -n->arg =$1; |
4478 | | -n->nulltesttype = IS_NULL; |
4479 | | -$$ = (Node *)n; |
4480 | | -} |
4481 | | -elseif (exprIsNullConstant($1)) |
4482 | | -{ |
4483 | | -NullTest *n = makeNode(NullTest); |
4484 | | -n->arg =$3; |
4485 | | -n->nulltesttype = IS_NULL; |
4486 | | -$$ = (Node *)n; |
4487 | | -} |
4488 | | -else |
4489 | | -$$ = makeA_Expr(OP,"=",$1,$3); |
4490 | | -} |
| 4467 | +{$$ = makeA_Expr(OP,"=",$1,$3); } |
4491 | 4468 |
|
4492 | 4469 | |a_exprOpa_expr |
4493 | 4470 | {$$ = makeA_Expr(OP,$2,$1,$3); } |
@@ -6137,7 +6114,7 @@ Oid param_type(int t) |
6137 | 6114 | /* |
6138 | 6115 | * Test whether an a_expr is a plain NULL constant or not. |
6139 | 6116 | */ |
6140 | | -staticbool |
| 6117 | +bool |
6141 | 6118 | exprIsNullConstant(Node *arg) |
6142 | 6119 | { |
6143 | 6120 | if (arg &&IsA(arg, A_Const)) |
|