From b0571ebf65a9d9772a8ac0a0e231477fb36859dc Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Fri, 27 Feb 1998 16:07:02 +0000 Subject: [PATCH] In '(a,b,...) Op [ANY|ALL] (SubSelect)' Op is restricted to '=' and '<>'. --- src/backend/parser/parse_expr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 62a53976a5..f4cf324762 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.22 1998/02/26 04:33:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.23 1998/02/27 16:07:02 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -266,7 +266,11 @@ transformExpr(ParseState *pstate, Node *expr, int precedence) if (length(left_expr) != length(right_expr)) elog(ERROR, "parser: Subselect has too many or too few fields."); - + + if (length(left_expr) > 1 && + strcmp (op, "=") != 0 && strcmp (op, "<>") != 0) + elog(ERROR, "parser: '%s' is not relational operator", op); + sublink->oper = NIL; foreach(elist, left_expr) { -- 2.40.0