Re: pgsql: Add infrastructure to support EphemeralNamedRelation references.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Grittner <kgrittn(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "pgsql-committers(at)postgresql(dot)org" <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Add infrastructure to support EphemeralNamedRelation references.
Date: 2017-04-06 22:21:00
Message-ID: 15598.1491517260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Kevin Grittner <kgrittn(at)gmail(dot)com> writes:
> On Thu, Apr 6, 2017 at 4:19 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> My compiler, quite justifiedly, complains:
>> /home/andres/src/postgresql/src/backend/parser/parse_relation.c:2899:43: warning: comparison between pointer and zero character constant [-Wpointer-compare]
>> (list_nth(rte->coltypes, attnum - 1) != InvalidOid);

> Good catch. Will push a change from list_nth() to list_nth_oid()
> for the benefit of stricter compilers.

If the problem is that the list is an OID list, then why didn't the
"Assert(IsPointerList(list))" in list_nth fire? Either this is the
wrong fix, or this code has never been exercised (at least not in
an assert-enabled build).

rte->coltypes certainly ought to be an OID list, so I lean to the
inadequate-testing theory ...

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2017-04-06 22:38:47 pgsql: Fix the RTE_NAMEDTUPLESTORE case in get_rte_attribute_is_dropped
Previous Message Kevin Grittner 2017-04-06 22:20:36 Re: pgsql: Add infrastructure to support EphemeralNamedRelation references.