Re: pg_dump --pretty-print-views

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pg_dump --pretty-print-views
Дата
Msg-id 5109C3DE.3040900@dunslane.net
обсуждение исходный текст
Ответ на Re: pg_dump --pretty-print-views  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_dump --pretty-print-views  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_dump --pretty-print-views  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On 01/30/2013 11:03 AM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> On 01/30/2013 09:58 AM, Tom Lane wrote:
>>> Marko Tiikkaja <pgmail@joh.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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: backend hangs at immediate shutdown
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump --pretty-print-views