Re: pg_dump --pretty-print-views

From: Keith Fiske <keith(at)omniti(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Tiikkaja <pgmail(at)joh(dot)to>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump --pretty-print-views
Date: 2014-04-29 17:29:22
Message-ID: CAG1_KcD69eV4BH+3K+avQ5WEyhEjRmBN+CfaFOCO=ibe9K+kEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 29, 2014 at 11:14 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Keith Fiske <keith(at)omniti(dot)com> writes:
> > On Sun, Feb 3, 2013 at 4:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Applied with corrections.
>
> > Was this ever committed into core? Apologies, I'm not very familiar with
> > looking through the commit history of the source code and I don't see
> > anything about this option or pretty-print outputs in the pg_dump/restore
> > docs for 9.3. Had someone asking me about this feature for pg_extractor
>
> Yeah, if I say "applied" that means I committed it. Here's the commit
> log entry:
>
> Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Branch: master Release: REL9_3_BR [62e666400] 2013-02-03 15:56:45 -0500
>
> 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
>
> As per the branch annotation, this is in 9.3 and up.
>
> regards, tom lane
>

Great! Thanks, Tom

--
Keith Fiske
Database Administrator
OmniTI Computer Consulting, Inc.
http://www.keithf4.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-29 17:32:50 Re: What about a castNode() macro?
Previous Message Stephen Frost 2014-04-29 17:10:35 Planned downtime @ Rackspace - 2014-04-29 2100-2200 UTC