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: | 5109C3DE.3040900@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
information_schema.columns.
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.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
nowrap.sql | text/x-sql | 7.1 KB |
wrap.sql | text/x-sql | 7.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-01-31 01:31:27 | Re: pg_dump --pretty-print-views |
Previous Message | Tatsuo Ishii | 2013-01-31 00:40:12 | Re: backend hangs at immediate shutdown |