On Tue, Sep 20, 2022 at 6:36 PM Aleksander Alekseev
<aleksander@timescale.com> wrote:
>
> Hi Amit,
>
> > I think it is better to use Size. Even though, it may not fail now as
> > the size of names for origin will always be much lesser but it is
> > better if we are consistent. If we agree with this, then as a first
> > patch, we can make it to use Size in existing places and then
> > introduce this new function.
>
> OK, here is the updated patchset.
>
> * 0001 replaces int's with Size's in the existing code
> * 0002 applies Peter's patch on top of 0001
>
Hi Aleksander.
FYI - although it is outside the scope of this thread, I did notice at
least one other example where you might want to substitute Size for
int in the same way as your v2-0001 patch did.
e.g. Just searching code for 'snprintf' where there is some parameter
for the size I quickly found:
File: src/bin/pg_dump/pg_dump_sort.c:
static void
describeDumpableObject(DumpableObject *obj, char *buf, int bufsize)
caller:
describeDumpableObject(loop[i], buf, sizeof(buf));
~~
I expect you can find more like just this if you look harder than I did.
------
Kind Regards,
Peter Smith.
Fujitsu Australia.