mirror of https://github.com/citusdata/citus.git
Enhances cycle mark values at ruleutils_14.c
Relevant PG commit: f4adc41c4f92cc91d507b19e397140c35bb9fd71pull/5209/head
parent
12b3c04fe3
commit
5bb538543d
|
@ -2051,10 +2051,21 @@ get_with_clause(Query *query, deparse_context *context)
|
|||
}
|
||||
|
||||
appendStringInfo(buf, " SET %s", quote_identifier(cte->cycle_clause->cycle_mark_column));
|
||||
|
||||
{
|
||||
Const *cmv = castNode(Const, cte->cycle_clause->cycle_mark_value);
|
||||
Const *cmd = castNode(Const, cte->cycle_clause->cycle_mark_default);
|
||||
|
||||
if (!(cmv->consttype == BOOLOID && !cmv->constisnull && DatumGetBool(cmv->constvalue) == true &&
|
||||
cmd->consttype == BOOLOID && !cmd->constisnull && DatumGetBool(cmd->constvalue) == false))
|
||||
{
|
||||
appendStringInfoString(buf, " TO ");
|
||||
get_rule_expr(cte->cycle_clause->cycle_mark_value, context, false);
|
||||
appendStringInfoString(buf, " DEFAULT ");
|
||||
get_rule_expr(cte->cycle_clause->cycle_mark_default, context, false);
|
||||
}
|
||||
}
|
||||
|
||||
appendStringInfo(buf, " USING %s", quote_identifier(cte->cycle_clause->cycle_path_column));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue