Re: pgsql: Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/RO

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/RO
Date: 2019-03-23 02:39:56
Message-ID: CAKJS1f89PP19eFfN3LWjP0b805tpCE1_77bMbfaxG99kcWai4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sat, 23 Mar 2019 at 15:33, Andres Freund <andres(at)anarazel(dot)de> wrote:
> I now get:
>
> /home/andres/src/postgresql/src/backend/parser/parse_func.c: In function ‘LookupFuncWithArgs’:
> /home/andres/src/postgresql/src/backend/parser/parse_func.c:2285:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
> switch (objtype)
> ^~~~~~
> /home/andres/src/postgresql/src/backend/parser/parse_func.c:2336:4: note: here
> case FUNCLOOKUP_AMBIGUOUS:
> ^~~~
>
> which seems like a somewhat righteous complaint? I'd just add a break to
> silence it (which can't be reached, because all paths ought to error
> out).

hmm. Surprised your compiler can't see that's not possible. I guess we
just need a break on line 2335.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2019-03-23 02:57:49 pgsql: Expand EPQ tests for UPDATEs and DELETEs
Previous Message Andres Freund 2019-03-23 02:33:33 Re: pgsql: Improve error reporting for DROP FUNCTION/PROCEDURE/AGGREGATE/RO