mirror of https://github.com/citusdata/citus.git
Adds for_each_from to ruleutils_14.c
Relevant PG commit: 56fe008996bc1a547ce60c8dddd2ca821cac163epull/5209/head
parent
beb49f0d53
commit
69aa240b99
|
@ -5064,7 +5064,7 @@ get_rule_expr(Node *node, deparse_context *context,
|
|||
{
|
||||
BoolExpr *expr = (BoolExpr *) node;
|
||||
Node *first_arg = linitial(expr->args);
|
||||
ListCell *arg = list_second_cell(expr->args);
|
||||
ListCell *arg;
|
||||
|
||||
switch (expr->boolop)
|
||||
{
|
||||
|
@ -5073,12 +5073,11 @@ get_rule_expr(Node *node, deparse_context *context,
|
|||
appendStringInfoChar(buf, '(');
|
||||
get_rule_expr_paren(first_arg, context,
|
||||
false, node);
|
||||
while (arg)
|
||||
for_each_from(arg, expr->args, 1)
|
||||
{
|
||||
appendStringInfoString(buf, " AND ");
|
||||
get_rule_expr_paren((Node *) lfirst(arg), context,
|
||||
false, node);
|
||||
arg = lnext(expr->args, arg);
|
||||
}
|
||||
if (!PRETTY_PAREN(context))
|
||||
appendStringInfoChar(buf, ')');
|
||||
|
@ -5089,12 +5088,11 @@ get_rule_expr(Node *node, deparse_context *context,
|
|||
appendStringInfoChar(buf, '(');
|
||||
get_rule_expr_paren(first_arg, context,
|
||||
false, node);
|
||||
while (arg)
|
||||
for_each_from(arg, expr->args, 1)
|
||||
{
|
||||
appendStringInfoString(buf, " OR ");
|
||||
get_rule_expr_paren((Node *) lfirst(arg), context,
|
||||
false, node);
|
||||
arg = lnext(expr->args, arg);
|
||||
}
|
||||
if (!PRETTY_PAREN(context))
|
||||
appendStringInfoChar(buf, ')');
|
||||
|
|
Loading…
Reference in New Issue