Re: properly sizing attnums in pg_get_publication_tables

2023-01-13 Thread Justin Pryzby
On Fri, Jan 13, 2023 at 07:37:29AM -0800, Ted Yu wrote: > Hi, > I was looking at commit b7ae03953690a1dee455ba3823cc8f71a72cbe1d . > > In `pg_get_publication_tables`, attnums is allocated with size > `desc->natts`. However, since some columns may be dropped, this size may be > larger than

properly sizing attnums in pg_get_publication_tables

2023-01-13 Thread Ted Yu
Hi, I was looking at commit b7ae03953690a1dee455ba3823cc8f71a72cbe1d . In `pg_get_publication_tables`, attnums is allocated with size `desc->natts`. However, since some columns may be dropped, this size may be larger than necessary. When `nattnums > 0` is false, there is no need to allocate the