diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-06-29 00:33:44 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-06-29 00:33:44 +0000 |
commit | bee217924d51af8cf0411167bfc8a7eb55122577 (patch) | |
tree | ab6d3f311de5fd6b415e0bdf032205ed503ba95c /src/include/parser | |
parent | df7618020b3845a51d1ba80cb9abfc6df5dfeaff (diff) | |
download | postgresql-bee217924d51af8cf0411167bfc8a7eb55122577.tar.gz postgresql-bee217924d51af8cf0411167bfc8a7eb55122577.zip |
Support expressions of the form 'scalar op ANY (array)' and
'scalar op ALL (array)', where the operator is applied between the
lefthand scalar and each element of the array. The operator must
yield boolean; the result of the construct is the OR or AND of the
per-element results, respectively.
Original coding by Joe Conway, after an idea of Peter's. Rewritten
by Tom to keep the implementation strictly separate from subqueries.
Diffstat (limited to 'src/include/parser')
-rw-r--r-- | src/include/parser/parse_oper.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index 66e12583645..3fd5eea2a8a 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_oper.h,v 1.28 2003/06/27 00:33:26 tgl Exp $ + * $Id: parse_oper.h,v 1.29 2003/06/29 00:33:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,6 +54,9 @@ extern Oid oprfuncid(Operator op); /* Build expression tree for an operator invocation */ extern Expr *make_op(ParseState *pstate, List *opname, Node *ltree, Node *rtree); +extern Expr *make_scalar_array_op(ParseState *pstate, List *opname, + bool useOr, + Node *ltree, Node *rtree); extern Expr *make_op_expr(ParseState *pstate, Operator op, Node *ltree, Node *rtree, Oid ltypeId, Oid rtypeId); |