Re: reprise: pretty print viewdefs

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: reprise: pretty print viewdefs
Дата
Msg-id CA+TgmoYvALGv_JWRcRwmoYZcWqzjdOC9=AqroGwreP99-oE72A@mail.gmail.com
обсуждение исходный текст
Ответ на reprise: pretty print viewdefs  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: reprise: pretty print viewdefs  (Andrew Dunstan <andrew@dunslane.net>)
Re: reprise: pretty print viewdefs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Dec 19, 2011 at 1:51 PM, Andrew Dunstan <andrew@dunslane.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.  On the other hand, I
agree that you'll probably find it a big improvement if they are
things like "nc.nspname::information_schema.sql_identifier as
udt_schema".

It has always seemed to me that a sensible strategy here would be to
try to produce output that looks good in 80 columns, on the assumption
that (1) everyone has at least that much horizontal space to play with
and (2) people who do won't necessarily mind it if we don't use all of
that horizontal space when pretty-printing SQL.

However, it is possible that I am living in the dark ages.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Indexes with duplicate columns
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: reprise: pretty print viewdefs