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 1oGTBQ-0002Bg-7H for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Jul 2022 22:37:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oGTBP-0005py-2m for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Jul 2022 22:37:43 +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 1oGTBO-0005pp-NV for pgsql-hackers@lists.postgresql.org; Tue, 26 Jul 2022 22:37:42 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oGTBM-0002CK-EF for pgsql-hackers@lists.postgresql.org; Tue, 26 Jul 2022 22:37:41 +0000 Received: by mail-oi1-x22b.google.com with SMTP id p132so18819784oif.9 for ; Tue, 26 Jul 2022 15:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=HaPSbVWi907TePdWtNqdjHL/GO4HTAxgmnltRw4vh0Q=; b=c66oqTFG+kQBSd5oA/xqsZUV28I7oucYihH9q8dqks8YA5cwn87TejhdfH2la61IlI mPhhyZSy8HeMp/l1kw0tpD85fUt7uORTyPc8H1aLK24m9q9GjecE0sfnxyP5CypLVAxw 0cCOAzS0O6oCIhg3CS1Lgea3qilmVaULDNdpui8d9BWw7yhgYtPzbjahKa1u4jlOmpnv 5xibTAsV28toQoCAy9dGFMRDaa0lNIkHyfIafGaq2mIWWqGUOcWcENMA5FnfB+US1sGK S4uFPesNb4g6cugNQ+A1W8/xmnjuQf68Bm597qbSVI+NsyzlTh0JHppYQN4MLNS/dcFV 5MrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=HaPSbVWi907TePdWtNqdjHL/GO4HTAxgmnltRw4vh0Q=; b=lDBkFgjJM3X/zhIA7hXG2C3LsWSSoew1g7yhf9yF8rXhCZVgRb+SNppM5DK+RktjbG nDKK01PcuQ2HOw/unFFm+e8eEjmDODCXTteeCE40liSj0XIedwCWs6a2JpOso+/qJPjZ F9MIq/qtu8H1PM65Jwyn4kpMGJZQ0Rz3gGRDfFDVtAonZiwD7UPP0zF/evGJ5dkATsm2 +fm92TVM8cfk6EiyA4rEsb2lZaKVppTvyMU/VKh9AyTVgXVtv6t0irRe8OGn/flY4tem HgGEC9ZooBIWAgHMcDqX+WhZAKvc3p38XHzEOMW/vjZ4Vt73ECJqG9XQocoOsWeGeiuR i5Xg== X-Gm-Message-State: AJIora/wU1tFIFCATOEtfWCDlqmWmuBGmVi1HsZ27OAQlborbTuiRLDi UbZaQYSOzUEW66ZoBfeJ/TZbe6oPVTuaoa6iMp4= X-Google-Smtp-Source: AGRyM1vPD/9iAT2sqIRLf6O44FpPVRpy/7EP3l+l9crpF9dTmJDJsCufbnriHnBn7NpgivLGMa0ehBd15OAZ4QpHwSk= X-Received: by 2002:a54:4e93:0:b0:339:d719:6d5e with SMTP id c19-20020a544e93000000b00339d7196d5emr561964oiy.259.1658875059892; Tue, 26 Jul 2022 15:37:39 -0700 (PDT) MIME-Version: 1.0 References: <4493999.1py09z8qHF@aivenronan> <3163474.aeNJFYEL58@aivenronan> In-Reply-To: From: David Rowley Date: Wed, 27 Jul 2022 10:37:26 +1200 Message-ID: Subject: Re: Add proper planner support for ORDER BY / DISTINCT aggregates To: Zhihong Yu Cc: Richard Guo , Ronan Dunklau , PostgreSQL Developers , Ranier Vilela Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 26 Jul 2022 at 12:01, Zhihong Yu wrote: > sort order the the planner chooses is simply : there is duplicate `the` I think the first "the" should be "that" > + /* mark this aggregate is covered by 'currpathkeys' */ > > is covered by -> as covered by I think it was shortened from "mark that this aggregate", but I dropped "that" to get the comment to fit on a single line. Swapping "is" for "as" makes it better. Thanks. David