Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize
| От | David Rowley |
|---|---|
| Тема | Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize |
| Дата | |
| Msg-id | CAApHDvrDo6-uavyTWa671uyxJtPFJ2JoKY7-TY7Q-vARhe3SzQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
On Wed, 1 May 2024 at 02:54, Tom Lane <tgl@sss.pgh.pa.us> wrote: > This version LGTM. The field names are fine, or at least I don't see > a reason to prefer the other way. One trivial nit: should we make > the array be AttrNumber* instead of int*? The space saving would be > negligible (it being very unlikely that there's ever more than one > entry), but AttrNumber is a more specific description of what it is. I've pushed this after adjusting the int array to become an AttrNumber array. I toyed with the idea of having the loop iterator in ExecInitIndexOnlyScan() an AttrNumber type, but in the end went with a cast. I felt this way was more robust against any possible future widening of the AttrNumber typedef. I added the cast to prevent any compilers from warning about truncation. This can't happen since indnkeyatts is int16, but I don't know if all compilers would be able to figure that out, so added a cast. Thank you to both of you for reviewing this. David
В списке pgsql-bugs по дате отправления: