pgsql: Perform line wrapping and indenting by default in ruleutils.c. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Perform line wrapping and indenting by default in ruleutils.c.
Date
Msg-id E1U26cQ-0000u7-JE@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Perform line wrapping and indenting by default in ruleutils.c.

This patch changes pg_get_viewdef() and allied functions so that
PRETTY_INDENT processing is always enabled.  Per discussion, only the
PRETTY_PAREN processing (that is, stripping of "unnecessary" parentheses)
poses any real forward-compatibility risk, so we may as well make dump
output look as nice as we safely can.

Also, set the default wrap length to zero (i.e, wrap after each SELECT
or FROM list item), since there's no very principled argument for the
former default of 80-column wrapping, and most people seem to agree this
way looks better.

Marko Tiikkaja, reviewed by Jeevan Chalke, further hacking by Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/62e666400dddf605b9b6d9a7ac2918711b5c5629

Modified Files
--------------
doc/src/sgml/func.sgml                     |    8 +-
src/backend/utils/adt/ruleutils.c          |   59 +-
src/test/regress/expected/aggregates.out   |   52 +-
src/test/regress/expected/collate.out      |   18 +-
src/test/regress/expected/create_view.out  |  537 ++++++++++----
src/test/regress/expected/polymorphism.out |    3 +-
src/test/regress/expected/rules.out        | 1070 +++++++++++++++++++++++++---
src/test/regress/expected/triggers.out     |    3 +-
src/test/regress/expected/window.out       |    8 +-
src/test/regress/expected/with.out         |   55 +-
src/test/regress/expected/xml.out          |   23 +-
src/test/regress/expected/xml_1.out        |    8 +-
12 files changed, 1496 insertions(+), 348 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: PL/Python: Add result object str handler
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Translation updates