From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Surafel Temesgen <surafel3000(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Subject: | Re: FETCH FIRST clause WITH TIES option |
Date: | 2020-04-08 00:51:52 |
Message-ID: | 20200408005152.GA24927@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2020-04-08 00:52:27 | Re: WIP: WAL prefetch (another approach) |
Previous Message | Tom Lane | 2020-04-08 00:51:26 | Re: ERROR: invalid input syntax for type circle |