Re: shadow variables - pg15 edition

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: shadow variables - pg15 edition
Дата
Msg-id 20220823021412.GG2342@telsasoft.com
обсуждение исходный текст
Ответ на Re: shadow variables - pg15 edition  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: shadow variables - pg15 edition  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
On Tue, Aug 23, 2022 at 01:38:40PM +1200, David Rowley wrote:
> On Tue, 23 Aug 2022 at 13:17, Justin Pryzby <pryzby@telsasoft.com> wrote:
> >  Attached is a squished version.
> 
> I see there's some renaming ones snuck in there. e.g:
> ... in fact, there's lots of renaming, so I'll just stop looking.

Actually, they didn't sneak in - what I sent are the patches which are ready to
be reviewed, excluding the set of "this" and "tmp" and other renames which you
disliked.  In the branch (not the squished patch) the first ~15 patches were
mostly for C99 for loops - I presented them this way deliberately, so you could
review and comment on whatever you're able to bite off, or run with whatever
parts you think are ready.  I rewrote it now to be more bite sized by
truncating off the 2nd half of the patches.

> Can you just send a patch that only changes the cases where you can
> remove a variable declaration from an outer scope into a single inner
> scope, or multiple inner scope when the variable can be declared
> inside a for() loop?

> would be to move the found_whole_row declaration into multiple inner
> scopes.  That's a net increase in code lines, for which I think
> requires more careful thought if we want that or not.

IMO it doesn't make sense to declare multiple integers for something like this
whether they're all ignored.  Nor for "save_errno" nor the third, similar case,
for the reason in the commit message.

-- 
Justin

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: sockaddr_un.sun_len vs. reality
Следующее
От: David Rowley
Дата:
Сообщение: Considering additional sort specialisation functions for PG16