From e6a89394f86e8d639583bbc6c55fcc6c17e9104f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Rzepecki?= Date: Wed, 5 Jun 2013 02:01:08 +0200 Subject: [PATCH] Allow mixing RowExprs and other expressions in the RHS of IN. --- src/backend/parser/parse_expr.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 7f0995f..16e69bf 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -1203,20 +1203,12 @@ transformAExprIn(ParseState *pstate, A_Expr *a) Node *rexpr = (Node *) lfirst(l); Node *cmp; - if (haveRowExpr) - { - if (!IsA(lexpr, RowExpr) || - !IsA(rexpr, RowExpr)) - ereport(ERROR, - (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("arguments of row IN must all be row expressions"), - parser_errposition(pstate, a->location))); + if (IsA(lexpr, RowExpr) && IsA(rexpr, RowExpr)) cmp = make_row_comparison_op(pstate, a->name, (List *) copyObject(((RowExpr *) lexpr)->args), ((RowExpr *) rexpr)->args, a->location); - } else cmp = (Node *) make_op(pstate, a->name, -- 1.8.1.2