Skip site navigation (1) Skip section navigation (2)

Re: pg_dump --pretty-print-views

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
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>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump --pretty-print-views
Date: 2013-01-31 01:07:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 01/30/2013 11:03 AM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 01/30/2013 09:58 AM, Tom Lane wrote:
>>> Marko Tiikkaja <pgmail(at)joh(dot)to> writes:
>>>> On 1/30/13 7:52 AM, Jeevan Chalke wrote:
>>>>> However, I am not sure about putting "WRAP_COLUMN_DEFAULT" by default. In
>>>>> my opinion we should put that by default but other people may object so I
>>>>> will keep that in code committors plate.
>>> FWIW, I'd vote for not enabling that by default --- it's basically an
>>> unwarranted assumption about how wide people's terminal windows are.
>> I'm not exactly sure what you're arguing for.
> Maybe I'm confused - I thought the alternative Jeevan was talking about
> was that we enable PRETTY_INDENT processing by default, but not
> wrapColumn processing.

Well, we could actually set the wrap value to 0, which would mean always 
wrap. That wouldn't be making any assumption about the user's terminal 
window size ;-)

Here are two examples, one of which is with exactly Marko's patch which 
doesn't change the wrap value (i.e. leaves it at -1, meaning no wrap) , 
the other sets it at 0. The example is a view that is the same as 

Personally I find the wrapped case MUCH more readable. I guess anything 
is an advance, but turning on PRETTY_INDENT without turning on some 
level of target wrapping seems like a half-done job.



Attachment: nowrap.sql
Description: text/x-sql (7.1 KB)
Attachment: wrap.sql
Description: text/x-sql (7.4 KB)

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2013-01-31 01:31:27
Subject: Re: pg_dump --pretty-print-views
Previous:From: Tatsuo IshiiDate: 2013-01-31 00:40:12
Subject: Re: backend hangs at immediate shutdown

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group