From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: reprise: pretty print viewdefs |
Date: | 2011-12-22 19:17:59 |
Message-ID: | 4EF38267.7000701@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/22/2011 01:05 PM, Tom Lane wrote:
> Robert Haas<robertmhaas(at)gmail(dot)com> writes:
>> On Mon, Dec 19, 2011 at 1:51 PM, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>>> The simple solution I originally proposed to put a line feed and some space
>>> before every target field in pretty print mode. This is a two line patch.
>>> The downsides are a) maybe not everyone will like the change and b) it will
>>> produce superfluous newlines, e.g. before CASE expressions.
>> With regard to (a), specifically, you won't like this change if your
>> column names are things like "bob" and "sam", because you'll burn
>> through an inordinate amount of vertical space.
> Yeah. I'm not exactly thrilled with (b), either, if it's a consequence
> of a change whose only excuse for living is to make the output look
> nicer. Random extra newlines don't look nicer to me.
>
>> It has always seemed to me that a sensible strategy here would be to
>> try to produce output that looks good in 80 columns,
> Maybe, though I fear it might complicate the ruleutils code a bit.
> You'd probably have to build the output for a column first and then
> see how long it is before deciding whether to insert a newline.
>
> In short, I don't mind trying to make this work better, but I think it
> will take more work than a two-line patch.
>
>
OK. Let me whip something up. I had already come to the conclusion you
did about how best to do this.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-12-22 19:26:00 | Re: disable prompting by default in createuser |
Previous Message | Phil Sorber | 2011-12-22 19:02:28 | Re: WIP patch: Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation |