aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-09-28 14:38:02 +0000
committerBruce Momjian <bruce@momjian.us>1999-09-28 14:38:02 +0000
commit77bef41c7fcc93926b9bae20e52a2f377e1a1db2 (patch)
tree1a1449c273f04449f166d4f18eb71bde3b8d1686 /src
parentf44c7bad6c5e8ceb4ed9b93bc2f56430902cdf38 (diff)
downloadpostgresql-77bef41c7fcc93926b9bae20e52a2f377e1a1db2.tar.gz
postgresql-77bef41c7fcc93926b9bae20e52a2f377e1a1db2.zip
More cleanup for | and ^.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/gram.y74
1 files changed, 67 insertions, 7 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 41a40c0fced..9d47406f217 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.101 1999/09/28 14:31:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.102 1999/09/28 14:38:02 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -4103,6 +4103,16 @@ a_expr: attr
n->subselect = $4;
$$ = (Node *)n;
}
+ | a_expr '*' '(' SubSelect ')'
+ {
+ SubLink *n = makeNode(SubLink);
+ n->lefthand = lcons($1, NULL);
+ n->oper = lcons("*",NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = $4;
+ $$ = (Node *)n;
+ }
| a_expr '/' '(' SubSelect ')'
{
SubLink *n = makeNode(SubLink);
@@ -4123,11 +4133,21 @@ a_expr: attr
n->subselect = $4;
$$ = (Node *)n;
}
- | a_expr '*' '(' SubSelect ')'
+ | a_expr '^' '(' SubSelect ')'
{
SubLink *n = makeNode(SubLink);
n->lefthand = lcons($1, NULL);
- n->oper = lcons("*",NIL);
+ n->oper = lcons("^",NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = $4;
+ $$ = (Node *)n;
+ }
+ | a_expr '|' '(' SubSelect ')'
+ {
+ SubLink *n = makeNode(SubLink);
+ n->lefthand = lcons($1, NULL);
+ n->oper = lcons("|",NIL);
n->useor = false;
n->subLinkType = EXPR_SUBLINK;
n->subselect = $4;
@@ -4193,6 +4213,16 @@ a_expr: attr
n->subselect = $5;
$$ = (Node *)n;
}
+ | a_expr '*' ANY '(' SubSelect ')'
+ {
+ SubLink *n = makeNode(SubLink);
+ n->lefthand = lcons($1,NIL);
+ n->oper = lcons("*",NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = $5;
+ $$ = (Node *)n;
+ }
| a_expr '/' ANY '(' SubSelect ')'
{
SubLink *n = makeNode(SubLink);
@@ -4213,11 +4243,21 @@ a_expr: attr
n->subselect = $5;
$$ = (Node *)n;
}
- | a_expr '*' ANY '(' SubSelect ')'
+ | a_expr '^' ANY '(' SubSelect ')'
{
SubLink *n = makeNode(SubLink);
n->lefthand = lcons($1,NIL);
- n->oper = lcons("*",NIL);
+ n->oper = lcons("^",NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = $5;
+ $$ = (Node *)n;
+ }
+ | a_expr '|' ANY '(' SubSelect ')'
+ {
+ SubLink *n = makeNode(SubLink);
+ n->lefthand = lcons($1,NIL);
+ n->oper = lcons("|",NIL);
n->useor = false;
n->subLinkType = ANY_SUBLINK;
n->subselect = $5;
@@ -4283,6 +4323,16 @@ a_expr: attr
n->subselect = $5;
$$ = (Node *)n;
}
+ | a_expr '*' ALL '(' SubSelect ')'
+ {
+ SubLink *n = makeNode(SubLink);
+ n->lefthand = lcons($1, NULL);
+ n->oper = lcons("*",NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = $5;
+ $$ = (Node *)n;
+ }
| a_expr '/' ALL '(' SubSelect ')'
{
SubLink *n = makeNode(SubLink);
@@ -4303,11 +4353,21 @@ a_expr: attr
n->subselect = $5;
$$ = (Node *)n;
}
- | a_expr '*' ALL '(' SubSelect ')'
+ | a_expr '^' ALL '(' SubSelect ')'
{
SubLink *n = makeNode(SubLink);
n->lefthand = lcons($1, NULL);
- n->oper = lcons("*",NIL);
+ n->oper = lcons("^",NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = $5;
+ $$ = (Node *)n;
+ }
+ | a_expr '|' ALL '(' SubSelect ')'
+ {
+ SubLink *n = makeNode(SubLink);
+ n->lefthand = lcons($1, NULL);
+ n->oper = lcons("|",NIL);
n->useor = false;
n->subLinkType = ALL_SUBLINK;
n->subselect = $5;