Re: pg_get_viewdefs() indentation considered harmful

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_get_viewdefs() indentation considered harmful
Дата
Msg-id 5197.1398816344@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_get_viewdefs() indentation considered harmful  (Greg Stark <stark@mit.edu>)
Ответы Re: pg_get_viewdefs() indentation considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> Actually the only thing that might want to be adjusted is the
> indentation in the beginning of the setop (ruleutils.c:4720) which is
> what causes that long line of parentheses at the beginning of the
> example. I suppose in an ideal world it would start following the
> reduced spacing and wrap to new lines whenever the indentation goes
> back to the left. But I can't get too excited by it in the example and
> I'm not sure it's even intended to line up anyways. It just inserts
> STD spaces without a newline.

Actually, the patch I posted a little bit ago gets rid of that.  However,
I'm still dubious about halving the step distance, because there are
assorted places that adjust the indentation of specific keywords by
distances that aren't a multiple of 2 (look for odd last arguments to
appendContextKeyword).  I'm not sure how that will look after we make such
a change.  Possibly it would work to only apply the scale factor to
context->indentLevel, and not the indentPlus number?
        regards, tom lane



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: pg_get_viewdefs() indentation considered harmful
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Fix initdb for path with whitespace and at char