Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uk42L-0001fx-Mp for pgsql-docs@arkaria.postgresql.org; Wed, 05 Jun 2013 03:05:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Uk42K-0001Rb-VV for pgsql-docs@arkaria.postgresql.org; Wed, 05 Jun 2013 03:05:21 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uk42I-0001RT-QN for pgsql-docs@postgresql.org; Wed, 05 Jun 2013 03:05:19 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uk42C-0002AK-De for pgsql-docs@postgresql.org; Wed, 05 Jun 2013 03:05:18 +0000 Received: by mail-pa0-f52.google.com with SMTP id bg2so689939pad.25 for ; Tue, 04 Jun 2013 20:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:to:subject:mime-version:content-type :content-disposition:user-agent; bh=E/OVhTZmvRY+73vzZhecy8TbWASrKpAWVR12v3pTjwE=; b=MsPSTtLrYQXhN/JCznudF9p9KThut2INFNbxBbkhJYro4w60ZBuRm2wOxI+GhQ05Kj kfIVCziQTVo9JYVXnC8LP1gtTtAONXlUbDhygXx8lxhu3IOqCHHPKyZRbAhVYIYSbj3Q hX/2ZKigL4xC31lppMcMEh2e3JtpTsAScVE26QjXm0aMMFW3dSZiH7gVOt8webMNC9Ph 8QddlFq0GEYsPN8CNB6iAVvfrb7zmWIAhA+4Z3LMF3sjx9TuwWMN0WQQZtWGZzkIrh/U urW6c8ttNzbQSnS69yneQWnwGtUfjasHoKfdRG/gMAbWRqbE/6TNe0dXbXov+23zsOn2 2qnQ== X-Received: by 10.66.123.72 with SMTP id ly8mr31487186pab.159.1370401510475; Tue, 04 Jun 2013 20:05:10 -0700 (PDT) Received: from eddie (74-37-186-49.dsl1.dta.ut.frontiernet.net. [74.37.186.49]) by mx.google.com with ESMTPSA id bd5sm880667pac.0.2013.06.04.20.05.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Jun 2013 20:05:09 -0700 (PDT) Message-ID: <51aeaae5.a5ac420a.05d9.4850@mx.google.com> Date: Tue, 4 Jun 2013 21:05:57 -0600 From: eggyknap To: pgsql-docs@postgresql.org Subject: Minor quibble with description of WINDOW clause MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IjNIXuzrMEaOuFwn" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --IjNIXuzrMEaOuFwn Content-Type: multipart/mixed; boundary="N5iGxCIPT7YMRg16" Content-Disposition: inline --N5iGxCIPT7YMRg16 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The way the WINDOW clause docs are currently worded, it's clear from the grammar tree that such clauses come toward the end of the query. But this phrase made me wonder, incorrectly, whether they were supposed to come before calls to window functions, somehow: "...where window_name is a name that can be referenced from subsequent window definitions or OVER clauses" See http://www.postgresql.org/docs/9.3/static/sql-select.html#SQL-WINDOW for the full context. I'd have preferred to see "...from OVER clauses or subsequent window definitions", which the attached simple patch does. And if I'm the only one that likes the idea of such a change, I'll gladly go away quietly. :) -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com --N5iGxCIPT7YMRg16 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="window.doc.patch" diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 213ea09..68309ba 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -654,8 +654,8 @@ HAVING condition WINDOW window_name AS ( window_definition ) [, ...] where window_name is - a name that can be referenced from subsequent window definitions or - OVER clauses, and + a name that can be referenced from OVER clauses or + subsequent window definitions, and window_definition is [ existing_window_name ] --N5iGxCIPT7YMRg16-- --IjNIXuzrMEaOuFwn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJRrqsVAAoJEAn8+lmCiIgHgDcP/inwTme22CpWBb9YHe+J+odS L6dKysqSFI1JZiI3P17aS6aslWIVhNFClejSToC/er7sH+fUUrBlhX4yXC2MYBAi Wht5AmVU0dFEKdjapANpxTDW6l12iz9VNGAm3/hajcVbiLj+aZMy7FbUz7qnh7Hs WS7Zzk/CPJFqb/bpFIUtN4Zg7NVgYQEheDrpy1CuqLmzP+Edeq6jZJNMsk7qZvdH Gvt8v+Y33x6ENzvB5A+M5ZzJqT2WtOXOQXZs88IwXbgDJJvhoMa3Ag76KoP4Uif1 xHSaY59pQtLaTMYyOwaQFBOG/7AY1J4K9JOc3ElhhYog4dJcVBcnx4RL/IJiS28T bJQJtbV9OR+oPWNaLCsBDBTRGPFp3NKW6KKZ/qCos42QoNzwvkZJJAbMC7ubqxbT F07odsNmbpicgMO35QnPRhE+XivFq2vXvkpnK7INx5WNXOVuYqB2QseT8XTmzwoX 3CEROdW7CZnBqV2sCfEVG+BRi6YCpbT5fTZHQPYMsH3TbB56xRyjx+V5YKcoxEqi HSGGQDfCVVE9UxQEfxDd6jieSv3d0TML0ObVUvCYI/OTSKngraAVSA5WcZoOaZzk zBrSZdPY5VQYZENlSJJOgsgSo0d2znHOFdh0wRN/sNPt2b0QHqRTJ6oD72fAq2IS 5dQKKTtei7giq1RTwB4i =v0t8 -----END PGP SIGNATURE----- --IjNIXuzrMEaOuFwn--