From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix indentation of JOIN clauses in rule/view dumps. |
Date: | 2014-04-30 16:01:36 |
Message-ID: | E1WfWwy-0005iH-FF@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix indentation of JOIN clauses in rule/view dumps.
The code attempted to outdent JOIN clauses further left than the parent
FROM keyword, which was odd in any case, and led to inconsistent formatting
since in simple cases the clauses couldn't be moved any further left than
that. And it left a permanent decrement of the indentation level, causing
subsequent lines to be much further left than they should be (again, this
couldn't be seen in simple cases for lack of indentation to give up).
After a little experimentation I chose to make it indent JOIN keywords
two spaces from the parent FROM, which is one space more than the join's
lefthand input in cases where that appears on a different line from FROM.
Back-patch to 9.3. This is a purely cosmetic change, and the bug is quite
old, so that may seem arbitrary; but we are going to be making some other
changes to the indentation behavior in both HEAD and 9.3, so it seems
reasonable to include this in 9.3 too. I committed this one first because
its effects are more visible in the regression test results as they
currently stand than they will be later.
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/164acbe33c0951221b1ae2e5285c793f404a75a1
Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 30 +-
src/test/regress/expected/create_view.out | 610 ++++++++++++++---------------
src/test/regress/expected/rules.out | 126 +++---
3 files changed, 384 insertions(+), 382 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-04-30 16:48:28 | pgsql: Limit overall indentation in rule/view dumps. |
Previous Message | Tom Lane | 2014-04-30 15:15:26 | pgsql: Fix uninitialized-variable warnings induced by recent commit. |