Commit f44c7bad authored by Bruce Momjian's avatar Bruce Momjian

Fix for creation of operator |.

parent 35a2e62c
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.100 1999/09/28 04:34:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.101 1999/09/28 14:31:19 momjian Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -977,6 +977,8 @@ default_expr: AexprConst ...@@ -977,6 +977,8 @@ default_expr: AexprConst
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); } { $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| default_expr '^' default_expr | default_expr '^' default_expr
{ $$ = nconc( $1, lcons( makeString( "^"), $3)); } { $$ = nconc( $1, lcons( makeString( "^"), $3)); }
| default_expr '|' default_expr
{ $$ = nconc( $1, lcons( makeString( "|"), $3)); }
| default_expr '=' default_expr | default_expr '=' default_expr
{ elog(ERROR,"boolean expressions not supported in DEFAULT"); } { elog(ERROR,"boolean expressions not supported in DEFAULT"); }
| default_expr '<' default_expr | default_expr '<' default_expr
...@@ -1127,6 +1129,8 @@ constraint_expr: AexprConst ...@@ -1127,6 +1129,8 @@ constraint_expr: AexprConst
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); } { $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| constraint_expr '^' constraint_expr | constraint_expr '^' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "^"), $3)); } { $$ = nconc( $1, lcons( makeString( "^"), $3)); }
| constraint_expr '|' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "|"), $3)); }
| constraint_expr '=' constraint_expr | constraint_expr '=' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "="), $3)); } { $$ = nconc( $1, lcons( makeString( "="), $3)); }
| constraint_expr '<' constraint_expr | constraint_expr '<' constraint_expr
...@@ -2042,6 +2046,8 @@ MathOp: '+' { $$ = "+"; } ...@@ -2042,6 +2046,8 @@ MathOp: '+' { $$ = "+"; }
| '*' { $$ = "*"; } | '*' { $$ = "*"; }
| '/' { $$ = "/"; } | '/' { $$ = "/"; }
| '%' { $$ = "%"; } | '%' { $$ = "%"; }
| '^' { $$ = "^"; }
| '|' { $$ = "|"; }
| '<' { $$ = "<"; } | '<' { $$ = "<"; }
| '>' { $$ = ">"; } | '>' { $$ = ">"; }
| '=' { $$ = "="; } | '=' { $$ = "="; }
...@@ -3638,6 +3644,8 @@ row_op: Op { $$ = $1; } ...@@ -3638,6 +3644,8 @@ row_op: Op { $$ = $1; }
| '*' { $$ = "*"; } | '*' { $$ = "*"; }
| '/' { $$ = "/"; } | '/' { $$ = "/"; }
| '%' { $$ = "%"; } | '%' { $$ = "%"; }
| '^' { $$ = "^"; }
| '|' { $$ = "|"; }
; ;
sub_type: ANY { $$ = ANY_SUBLINK; } sub_type: ANY { $$ = ANY_SUBLINK; }
...@@ -3672,22 +3680,28 @@ a_expr: attr ...@@ -3672,22 +3680,28 @@ a_expr: attr
{ $$ = makeA_Expr(OP, "%", NULL, $2); } { $$ = makeA_Expr(OP, "%", NULL, $2); }
| '^' a_expr | '^' a_expr
{ $$ = makeA_Expr(OP, "^", NULL, $2); } { $$ = makeA_Expr(OP, "^", NULL, $2); }
| '|' a_expr
{ $$ = makeA_Expr(OP, "|", NULL, $2); }
| a_expr '%' | a_expr '%'
{ $$ = makeA_Expr(OP, "%", $1, NULL); } { $$ = makeA_Expr(OP, "%", $1, NULL); }
| a_expr '^' | a_expr '^'
{ $$ = makeA_Expr(OP, "^", $1, NULL); } { $$ = makeA_Expr(OP, "^", $1, NULL); }
| a_expr '|'
{ $$ = makeA_Expr(OP, "|", $1, NULL); }
| a_expr '+' a_expr | a_expr '+' a_expr
{ $$ = makeA_Expr(OP, "+", $1, $3); } { $$ = makeA_Expr(OP, "+", $1, $3); }
| a_expr '-' a_expr | a_expr '-' a_expr
{ $$ = makeA_Expr(OP, "-", $1, $3); } { $$ = makeA_Expr(OP, "-", $1, $3); }
| a_expr '*' a_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); }
| a_expr '/' a_expr | a_expr '/' a_expr
{ $$ = makeA_Expr(OP, "/", $1, $3); } { $$ = makeA_Expr(OP, "/", $1, $3); }
| a_expr '%' a_expr | a_expr '%' a_expr
{ $$ = makeA_Expr(OP, "%", $1, $3); } { $$ = makeA_Expr(OP, "%", $1, $3); }
| a_expr '*' a_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); }
| a_expr '^' a_expr | a_expr '^' a_expr
{ $$ = makeA_Expr(OP, "^", $1, $3); } { $$ = makeA_Expr(OP, "^", $1, $3); }
| a_expr '|' a_expr
{ $$ = makeA_Expr(OP, "|", $1, $3); }
| a_expr '<' a_expr | a_expr '<' a_expr
{ $$ = makeA_Expr(OP, "<", $1, $3); } { $$ = makeA_Expr(OP, "<", $1, $3); }
| a_expr '>' a_expr | a_expr '>' a_expr
...@@ -4363,22 +4377,28 @@ b_expr: attr ...@@ -4363,22 +4377,28 @@ b_expr: attr
{ $$ = makeA_Expr(OP, "%", NULL, $2); } { $$ = makeA_Expr(OP, "%", NULL, $2); }
| '^' b_expr | '^' b_expr
{ $$ = makeA_Expr(OP, "^", NULL, $2); } { $$ = makeA_Expr(OP, "^", NULL, $2); }
| '|' b_expr
{ $$ = makeA_Expr(OP, "|", NULL, $2); }
| b_expr '%' | b_expr '%'
{ $$ = makeA_Expr(OP, "%", $1, NULL); } { $$ = makeA_Expr(OP, "%", $1, NULL); }
| b_expr '^' | b_expr '^'
{ $$ = makeA_Expr(OP, "^", $1, NULL); } { $$ = makeA_Expr(OP, "^", $1, NULL); }
| b_expr '|'
{ $$ = makeA_Expr(OP, "|", $1, NULL); }
| b_expr '+' b_expr | b_expr '+' b_expr
{ $$ = makeA_Expr(OP, "+", $1, $3); } { $$ = makeA_Expr(OP, "+", $1, $3); }
| b_expr '-' b_expr | b_expr '-' b_expr
{ $$ = makeA_Expr(OP, "-", $1, $3); } { $$ = makeA_Expr(OP, "-", $1, $3); }
| b_expr '*' b_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); }
| b_expr '/' b_expr | b_expr '/' b_expr
{ $$ = makeA_Expr(OP, "/", $1, $3); } { $$ = makeA_Expr(OP, "/", $1, $3); }
| b_expr '%' b_expr | b_expr '%' b_expr
{ $$ = makeA_Expr(OP, "%", $1, $3); } { $$ = makeA_Expr(OP, "%", $1, $3); }
| b_expr '*' b_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); }
| b_expr '^' b_expr | b_expr '^' b_expr
{ $$ = makeA_Expr(OP, "^", $1, $3); } { $$ = makeA_Expr(OP, "^", $1, $3); }
| b_expr '|' b_expr
{ $$ = makeA_Expr(OP, "|", $1, $3); }
| ':' b_expr | ':' b_expr
{ $$ = makeA_Expr(OP, ":", NULL, $2); } { $$ = makeA_Expr(OP, ":", NULL, $2); }
| ';' b_expr | ';' b_expr
......
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