* back to source text
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.179 2004/08/29 05:06:49 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.180 2004/09/01 23:58:38 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
{
case SETOP_UNION:
appendContextKeyword(context, "UNION ",
- -PRETTYINDENT_STD, 0, 0);
+ -PRETTYINDENT_STD, PRETTYINDENT_STD, 0);
break;
case SETOP_INTERSECT:
appendContextKeyword(context, "INTERSECT ",
- -PRETTYINDENT_STD, 0, 0);
+ -PRETTYINDENT_STD, PRETTYINDENT_STD, 0);
break;
case SETOP_EXCEPT:
appendContextKeyword(context, "EXCEPT ",
- -PRETTYINDENT_STD, 0, 0);
+ -PRETTYINDENT_STD, PRETTYINDENT_STD, 0);
break;
default:
elog(ERROR, "unrecognized set op: %d",
appendStringInfo(buf, "ALL ");
if (PRETTY_INDENT(context))
- appendStringInfoChar(buf, '\n');
+ appendContextKeyword(context, "", 0, 0, 0);
need_paren = !IsA(op->rarg, RangeTblRef);
if (PRETTY_INDENT(context))
{
context->indentLevel += indentBefore;
- if (context->indentLevel < 0)
- context->indentLevel = 0;
appendStringInfoChar(context->buf, '\n');
appendStringInfoSpaces(context->buf,
- context->indentLevel + indentPlus);
- }
-
- appendStringInfoString(context->buf, str);
+ Max(context->indentLevel, 0) + indentPlus);
+ appendStringInfoString(context->buf, str);
- if (PRETTY_INDENT(context))
- {
context->indentLevel += indentAfter;
if (context->indentLevel < 0)
context->indentLevel = 0;
}
+ else
+ appendStringInfoString(context->buf, str);
}
/*