From bd4837bd11e97c5184616d86decf7b71046334c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Rzepecki?= <divided.mind@gmail.com>
Date: Wed, 5 Jun 2013 01:56:40 +0200
Subject: [PATCH] Only use make_row_comparison_op in transformAExprIn if LHS is
 a RowExpr.

---
 src/backend/parser/parse_expr.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 7f0995f..5e2d92d 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -1203,10 +1203,9 @@ transformAExprIn(ParseState *pstate, A_Expr *a)
 		Node	   *rexpr = (Node *) lfirst(l);
 		Node	   *cmp;
 
-		if (haveRowExpr)
+		if (haveRowExpr && IsA(lexpr, RowExpr))
 		{
-			if (!IsA(lexpr, RowExpr) ||
-				!IsA(rexpr, RowExpr))
+			if (!IsA(rexpr, RowExpr))
 				ereport(ERROR,
 						(errcode(ERRCODE_SYNTAX_ERROR),
 				   errmsg("arguments of row IN must all be row expressions"),
-- 
1.8.1.2

