From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Amit Langote <amitlan(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Prevent duplicate RTEPermissionInfo for plain-inheritance parent |
Date: | 2023-10-26 08:08:01 |
Message-ID: | CA+HiwqGNxKBQ3g0-bxU_CEFgdS-zCdxqS-m0BAMY0FhakxwWyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Thu, Oct 26, 2023 at 4:59 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> On Thu, Oct 26, 2023 at 3:08 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> > On Thu, 26 Oct 2023 at 15:59, Amit Langote <amitlan(at)postgresql(dot)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?
Oops, wasn't a question. :)
> > Maybe parentOID needs a PG_USED_FOR_ASSERTS_ONLY?
>
> Hmm, how about simply removing the variable?
Actually, using PG_USED_FOR_ASSERTS_ONLY seems fine. I will push a fix shortly.
--
Thanks, Amit Langote
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2023-10-26 08:33:26 | pgsql: Avoid compiler warning in non-assert builds |
Previous Message | Amit Langote | 2023-10-26 07:59:13 | Re: pgsql: Prevent duplicate RTEPermissionInfo for plain-inheritance parent |