Re: shadow variables - pg15 edition

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: shadow variables - pg15 edition
Дата
Msg-id CAApHDvoSgT93Da5D=ZWWhsE_exGyjK6sGWt5LpFJHsnaXVELzw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: shadow variables - pg15 edition  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: shadow variables - pg15 edition
Список pgsql-hackers
On Tue, 23 Aug 2022 at 14:14, Justin Pryzby <pryzby@telsasoft.com> wrote:
> 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.

Thanks for the updated patch.

I've now pushed it after making some small adjustments.

It seems there was one leftover rename still there, I removed that.
The only other changes I made were to just make the patch mode
consistent with what it was doing.  There were a few cases where you
were doing:

  if (typlen == -1) /* varlena */
  {
- int i;
-
- for (i = 0; i < nvalues; i++)
+ for (int i = 0; i < nvalues; i++)

That wasn't really required to remove the warning as you'd already
adjusted the scope of the shadowed variable so there was no longer a
collision.  The reason I adjusted these was because sometimes you were
doing that, and sometimes you were not.  I wanted to be consistent, so
I opted for not doing it as it's not required for this effort.  Maybe
one day those can be changed in some other unrelated effort to C99ify
our code.

The attached patch is just the portions I didn't commit.

Thanks for working on this.

David

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inconsistencies around defining FRONTEND
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: logical decoding and replication of sequences