Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLywq-00050B-Fm for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Apr 2020 00:52:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLywp-0003kv-9l for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Apr 2020 00:52:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLywp-0003hA-2x for pgsql-hackers@lists.postgresql.org; Wed, 08 Apr 2020 00:52:07 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jLywm-0001Tf-Jt for pgsql-hackers@postgresql.org; Wed, 08 Apr 2020 00:52:06 +0000 Received: by mail-qk1-x743.google.com with SMTP id x66so1118016qkd.9 for ; Tue, 07 Apr 2020 17:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5dx270TROh9yF65pAoSwnJwpLRTUX2/BQ2QvpxDXH84=; b=z8qxRsa72+ivQkjW0YfWAD1H4V2OMOHY77DkP7jJAMUJxK8bqIneXAcEvfEPDFgVei /QkxuBix58K20qDgRAp3MKxLZqgjW8VZH8WkdnfjsyJP9mwS9OCGRT2M5/pXQ56tXrT0 TCsbiruIMQ7AdTLoTwbZlLkijca/M64Zza5o+QeEd6tbBc5J2au9wlTvIG7dt9s5EDRk IkTJpG+5WMCLT8Le845th8vdsFforpJcK8dPuDdPjG+1D2XljfSUgAKXxmFOLf1Y7s6S m8ckydY8uXwuQIX3oixa3ml6Ijg2Jdj89EB6D0Stgn98xOAUHv+NcMXp4Q9ih2JvkAZD gwMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5dx270TROh9yF65pAoSwnJwpLRTUX2/BQ2QvpxDXH84=; b=qRdnPgIPQA8ftOQ0owTOg1l+5JNB0ukTtp/9iL9Qt0dKIUe8quOhFyGeHnUTPxAJP6 Lc/47qQ/JCJCVTNV5QIEOw9fbaXyUswPq3eCkSvQ3SHrJA/x5b/nGbRtp7LVDzJpQuAT L0HfOqHLrwhmXw5r5XIO5ILlLjhxin0Xi4g2PKTyJkH5lhd/oV2z8AYnEaLrwnQ62ZSa k+hloVoiLZkGOC0p94yMgA4vIHZ8ypkhPnE05qMHi+ro1pWNAt4tZPEUqkFN9uTHojmw ULg70oMFj9hctIJIS3iCSFDBApv907FlJxUe92T1bGN8pq4/KEi98zDWUKLoGk/VFxV+ cWqA== X-Gm-Message-State: AGi0Pub6CVT3qQSQY1QDSJjDbQ1RpvITuNaeEHsCes/gzjT3wYmoYZBP eqhrFIuPJxMubgV7WSFd6qTfDA== X-Google-Smtp-Source: APiQypJitCCnD7zanmMw0dpNDVOAXiHCOD3Cdped73nK8uui1xc2ncvGFQ+HiD3mCHs6d8qqUmOiDQ== X-Received: by 2002:ae9:e212:: with SMTP id c18mr5209317qkc.452.1586307123224; Tue, 07 Apr 2020 17:52:03 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id w13sm17203317qtn.81.2020.04.07.17.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 17:52:02 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 6D9353008DB; Tue, 7 Apr 2020 20:51:52 -0400 (-04) Date: Tue, 7 Apr 2020 20:51:52 -0400 From: Alvaro Herrera To: Andres Freund Cc: Surafel Temesgen , Tomas Vondra , PostgreSQL Hackers , Andrew Gierth Subject: Re: FETCH FIRST clause WITH TIES option Message-ID: <20200408005152.GA24927@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200408004902.u6zfzlnhj77gxmgt@alap3.anarazel.de> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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