From bee217924d51af8cf0411167bfc8a7eb55122577 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 29 Jun 2003 00:33:44 +0000 Subject: 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. --- src/include/parser/parse_oper.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/include/parser/parse_oper.h') 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); -- cgit v1.2.3