Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xCWOP-00000003qB7-1utl for pgsql-docs@arkaria.postgresql.org; Fri, 02 Oct 2026 06:05:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xCWOO-0000000AaR4-26aD for pgsql-docs@arkaria.postgresql.org; Fri, 02 Oct 2026 06:05:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xC1MU-00000003uA7-0uUH for pgsql-docs@lists.postgresql.org; Wed, 30 Sep 2026 20:57:10 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xC1MR-00000002A4L-05c8 for pgsql-docs@lists.postgresql.org; Wed, 30 Sep 2026 20:57:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=M10Uzpca3G0NCrZ26WEVqK52ohWgvDpRfCV2vUcma/8=; b=Fj2TzkvTflh+/PlKfGid4HtuJb JJtR09UJJ/YbJ9ts4cuXkEtDQz1/026scY72sQX5GyWBB3uE1Sf2lrUc8GPHFBbXTHkJLCwyMJ+ct e9X9avZdqhc6ogWVYMyFMtTi4YH+sdTMZoGryEeSC47W30QL1NPvW/03eEbX4N7OcFZknZGYcBMYW 4JwlM2zC2/S9+aQaZaL9wdF8n6VsWOFjX5N07VVWGZ4iNu0HhkXmMZMZtyBJNSB00VBwEdoM7osOE ZAuEeCvsHDsy5DmFypbC1fW3BqmDizFmJxk/Z4xwHLq9Yr7nXyIFD2fVkFfU7TbAFZXcz173+GW0B fQdmVdGw==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xC1MP-0015nz-20 for pgsql-docs@lists.postgresql.org; Wed, 30 Sep 2026 20:57:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xC1MO-00000000LRN-0dIX for pgsql-docs@lists.postgresql.org; Wed, 30 Sep 2026 20:57:04 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Improve "3.5. Window Functions" tutorial To: pgsql-docs@lists.postgresql.org From: PG Doc comments form Cc: matematica.a3k@gmail.com Reply-To: matematica.a3k@gmail.com, pgsql-docs@lists.postgresql.org Date: Wed, 30 Sep 2026 20:56:45 +0000 Message-ID: <179080180503.1026193.14981416435978499059@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/18/tutorial-window.html Description: Hi! I would like to propose improvements on the "3.5. Window Functions" tutorial. There are two issues on the tutorial IMO: - Paragraph structure: Minor - yet perceivable, easy improvement on readability. Might be discussed at last if agreed. - Two paragraphs seems "disjointed": " There is another important concept associated with window functions: for each row, there is a set of rows within its partition called its window frame. Some window functions act only on the rows of the window frame, rather than of the whole partition. By default, if ORDER BY is supplied, then the frame consists of all rows from the start of the partition up through the current row, plus any following rows that are equal to the current row according to the ORDER BY clause. When ORDER BY is omitted, the default frame consists of all rows in the partition. [5] " which may be improved with: " There is another important concept associated with window functions: for each row, there is a set of rows within its partition called its window frame. Some window functions act only on the rows of the window frame, rather than of the whole partition. *** That set of rows can be "scoped" even further if an ordering is provided. Once an ordering is provided, concepts like "start", "position" and "end" can be defined and therefore, criterias to match them. If no ordering is provided, the set of rows cannot be further scoped and coincide with the partition. *** By default, if ORDER BY is supplied, then the frame consists of all rows from the start of the partition up through the current row, plus any following rows that are equal to the current row according to the ORDER BY clause. When ORDER BY is omitted, the default frame consists of all rows in the partition. [5] " Wording may be improved ("scoped"), I think the added paragraph links the existing ones providing more meaning. Regards, Rodrigo