On Thu, Oct 26, 2023 at 3:08 PM David Rowley <dgrowle...@gmail.com> wrote: > On Thu, 26 Oct 2023 at 15:59, Amit Langote <amit...@postgresql.org> wrote: > > src/backend/optimizer/util/inherit.c | 9 ++------- > > Hi Amit, > > I'm getting an unused variable warning from this with non-assert builds: > > [697/1908] Compiling C object > src/backend/postgres_lib.a.p/optimizer_util_inherit.c.o > ../src/backend/optimizer/util/inherit.c: In function > ‘expand_single_inheritance_child’: > ../src/backend/optimizer/util/inherit.c:460:33: warning: unused > variable ‘parentOID’ [-Wunused-variable] > 460 | Oid parentOID = > RelationGetRelid(parentrel); > | ^~~~~~~~~
Thanks for the heads up? > Maybe parentOID needs a PG_USED_FOR_ASSERTS_ONLY? Hmm, how about simply removing the variable? -- Thanks, Amit Langote EDB: http://www.enterprisedb.com