Re: pgindent vs variable declaration across multiple lines

Поиск
Список
Период
Сортировка
Искать
От
Thomas Munro
Тема
Re: pgindent vs variable declaration across multiple lines
Дата
Msg-id
CA+hUKGLVaG6sWhO2gZoapkOL4sAK7QOEtJ-TSB-uZxLvb6XkCA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
pgindent vs variable declaration across multiple lines Andres Freund <andres@anarazel.de>
Re: pgindent vs variable declaration across multiple lines Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent vs variable declaration across multiple lines Andres Freund <andres@anarazel.de>
Re: pgindent vs variable declaration across multiple lines Andres Freund <andres@anarazel.de>
Re: pgindent vs variable declaration across multiple lines Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent vs variable declaration across multiple lines Thomas Munro <thomas.munro@gmail.com>
Re: pgindent vs variable declaration across multiple lines Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent vs variable declaration across multiple lines Andrew Dunstan <andrew@dunslane.net>
Re: pgindent vs variable declaration across multiple lines Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent vs variable declaration across multiple lines Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent vs variable declaration across multiple lines Andres Freund <andres@anarazel.de>
Re: pgindent vs variable declaration across multiple lines Thomas Munro <thomas.munro@gmail.com>
Re: pgindent vs variable declaration across multiple lines Robert Haas <robertmhaas@gmail.com>
On Mon, Jan 23, 2023 at 11:34 AM Tom Lane  wrote:
> I spent some more time staring at this and came up with what seems like
> a workable patch, based on the idea that what we want to indent is
> specifically initialization expressions.  pg_bsd_indent does have some
> understanding of that: ps.block_init is true within such an expression,
> and then ps.block_init_level is the brace nesting depth inside it.
> If you just enable ind_stmt based on block_init then you get a bunch
> of unwanted additional indentation inside struct initializers, but
> it seems to work okay if you restrict it to not happen inside braces.
> More importantly, it doesn't change anything we don't want changed.

Nice!  LGTM now that I know about block_init.


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Peter Geoghegan
Дата:
FAQ