agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Surafel Temesgen <surafel3000@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Subject: Re: FETCH FIRST clause WITH TIES option
Date: Tue, 7 Apr 2020 20:51:52 -0400
Message-ID: <20200408005152.GA24927@alvherre.pgsql> (raw)
In-Reply-To: <20200408004902.u6zfzlnhj77gxmgt@alap3.anarazel.de>
Hello
On 2020-Apr-07, Andres Freund wrote:
> On 2020-04-07 16:36:54 -0400, Alvaro Herrera wrote:
> > Pushed, with some additional changes.
>
> This triggers a new warning for me (gcc-10):
> /home/andres/src/postgresql/src/backend/executor/nodeLimit.c: In function ‘ExecLimit’:
> /home/andres/src/postgresql/src/backend/executor/nodeLimit.c:136:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 136 | if (ScanDirectionIsForward(direction))
> | ^
> /home/andres/src/postgresql/src/backend/executor/nodeLimit.c:216:3: note: here
> 216 | case LIMIT_WINDOWEND_TIES:
> | ^~~~
>
> I've not looked at it in any sort of detail, but it looks like it might
> be a false positive, with the "fall-through" comment not being
> sufficient to quiesce the compiler?
It's on purpose, yeah, but I can understand the compiler not getting it.
> Cosmetically I would agree that falling through to the next case" a few
> blocks deep inside a case: isn't the prettiest...
That's true ... maybe a fix would be to split that stuff to a
subroutine?
Thanks
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
view thread (61+ messages) latest in thread
Message-ID: <20200408005152.GA24927@alvherre.pgsql>
Permalink: ../20200408005152.GA24927@alvherre.pgsql/
Also on: postgresql.org/message-id/20200408005152.GA24927@alvherre.pgsql
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, andres@anarazel.de, surafel3000@gmail.com, tomas.vondra@2ndquadrant.com, andrew@tao11.riddles.org.uk
Subject: Re: FETCH FIRST clause WITH TIES option
In-Reply-To: <20200408005152.GA24927@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox