aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index f314745818b..7829bcbac16 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -182,6 +182,12 @@ transformExprRecurse(ParseState *pstate, Node *expr)
case AEXPR_IN:
result = transformAExprIn(pstate, a);
break;
+ case AEXPR_LIKE:
+ case AEXPR_ILIKE:
+ case AEXPR_SIMILAR:
+ /* we can transform these just like AEXPR_OP */
+ result = transformAExprOp(pstate, a);
+ break;
case AEXPR_BETWEEN:
case AEXPR_NOT_BETWEEN:
case AEXPR_BETWEEN_SYM:
@@ -1649,6 +1655,12 @@ transformSubLink(ParseState *pstate, SubLink *sublink)
ListCell *l;
/*
+ * If the source was "x IN (select)", convert to "x = ANY (select)".
+ */
+ if (sublink->operName == NIL)
+ sublink->operName = list_make1(makeString("="));
+
+ /*
* Transform lefthand expression, and convert to a list
*/
lefthand = transformExprRecurse(pstate, sublink->testexpr);