Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references. - Mailing list pgsql-committers

From Kevin Grittner
Subject Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.
Date
Msg-id CACjxUsP8g_4yhdFS7rPd+YUz__s8_3MC059tKf-UJ__h6Wr3ig@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.  (Andres Freund <andres@anarazel.de>)
Responses Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.  (Thomas Munro <thomas.munro@enterprisedb.com>)
Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.  (Andres Freund <andres@anarazel.de>)
Re: [COMMITTERS] pgsql: Add infrastructure to support EphemeralNamedRelation references.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Thu, Apr 6, 2017 at 4:19 PM, Andres Freund <andres@anarazel.de> wrote:

> My compiler, quite justifiedly, complains:
>
> /home/andres/src/postgresql/src/backend/parser/parse_relation.c: In function ‘get_rte_attribute_is_dropped’:
> /home/andres/src/postgresql/src/backend/parser/parse_relation.c:2899:43: warning: comparison between pointer and zero
characterconstant [-Wpointer-compare] 
>       (list_nth(rte->coltypes, attnum - 1) != InvalidOid);
>                                            ^~
> /home/andres/src/postgresql/src/backend/parser/parse_relation.c:2899:7: note: did you mean to dereference the
pointer?
>       (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.  While I'm at it, I'll throw
on another layer of parentheses to ensure people read that
correctly.  Out of curiosity, what compiler or setting catches this?

--
Kevin Grittner


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: [COMMITTERS] pgsql: Allow avoiding tuple copy within tuplesort_gettupleslot().
Next
From: Thomas Munro
Date:
Subject: Re: [COMMITTERS] pgsql: Add infrastructure to supportEphemeralNamedRelation references.