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 1m1ARH-0004CS-PV for pgsql-docs@arkaria.postgresql.org; Wed, 07 Jul 2021 16:30:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1ARG-0002ag-3Q for pgsql-docs@arkaria.postgresql.org; Wed, 07 Jul 2021 16:30:18 +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 1m1ARF-0002Ps-J3 for pgsql-docs@lists.postgresql.org; Wed, 07 Jul 2021 16:30:17 +0000 Received: from resqmta-ch2-04v.sys.comcast.net ([2001:558:fe21:29:69:252:207:36]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1ARB-0004dV-CR for pgsql-docs@lists.postgresql.org; Wed, 07 Jul 2021 16:30:16 +0000 Received: from resomta-ch2-11v.sys.comcast.net ([69.252.207.107]) by resqmta-ch2-04v.sys.comcast.net with ESMTP id 16wwmIui1x10y1AR9mTRrd; Wed, 07 Jul 2021 16:30:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1625675411; bh=9aHxzSCtZTgr5J+Qjzekd9tPtTqJXvMHBmf9KQeOJmw=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=RYCGhT1Q1yHJdy+ltd2fDRaWVN5ruinXvvxU9MRTrvv0QNKzhAbLQkeO0h09CZdcM OWAy3DcmbgF0Xf7xj90KZ/edbKom4ZvUirXllpQJm9xCjduJv4F1V+BGW/r76Mg415 mJAGq21UW88iXYENPAn7Iqvkobd/N6YynlxXxwS0ENHKrwTV5eZc/FMMVQWMKDxmUy uPFQ1nv2i0EXRBKt1nHJ5vyDi+cP1xks1cU1jauw4CSlprXADdSqj35hu5g2pvcEjo LAEm0/Ie/tvsnoiFRCil1bXRfz2hozzNBcZHnqSpwekijp8lHPx9xrnuoUqdjBfHuE c8gGWGoCOqTDw== Received: from shrew ([66.30.144.167]) by resomta-ch2-11v.sys.comcast.net with ESMTPA id 1AR7mUGETbqEC1AR8mZ9Xm; Wed, 07 Jul 2021 16:30:11 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvtddrtddvgdellecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpeffhffvuffkgggtuggfsehttdertddtredvnecuhfhrohhmpehrihhruceorhhirhgrnhhssegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeduveffgeekueffheetieehgfekhfefheegiefffefhgedvteekgfdthfetgfekhfenucffohhmrghinheprggsohhvvgdrphhlnecukfhppeeiiedrfedtrddugeegrdduieejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepshhhrhgvfidpihhnvghtpeeiiedrfedtrddugeegrdduieejpdhmrghilhhfrhhomheprhhirhgrnhhssegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepphhgshhqlhdqughotghssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-Xfinity-VMeta: sc=-51.00;st=legit Received: from rir by shrew with local (Exim 4.92) (envelope-from ) id 1m1AR7-0002bs-QA for pgsql-docs@lists.postgresql.org; Wed, 07 Jul 2021 12:30:09 -0400 Date: Wed, 7 Jul 2021 12:30:09 -0400 From: rir To: Pg Docs Subject: conventions Message-ID: <20210707163009.44wpfn7uc72zwyp7@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The conventions page is weak. Here is a proposed start for change. Seeing SQL as an early language, I have tried to use something like plain English. Here "early" could describe a mail merge user wandering into programming SQL after seeing some simple examples. I like the idea of accessibility but I may have been overly influenced by the tone of the existing page. I tried to express the idea of operators and that "repeaters" could/should be viewed as tokens. I am not sure if parenthetical groups are degenerate in their behavior pertaining to their contents. It seems they take the op's on the outside. Thanks, rob Conventions The conventions used in the synopses of commands vary with the language being presented. SQL The conventions for SQL synopses consist of placeholders, groups, repeaters and the alternator. Placeholders are bold, italicized names for SQL code. Often the placeholder's definition or syntax is is introduced and presented later in the synopsis. When not defined, there are three possible reasons: 1. The placeholder is self-evident, i.e. "name" being more helpful in giving the intent of the code than "sql_identifier". 2. The placeholder is a common SQL construct explained elsewhere, i.e. "expression". 3. The placeholder is arcane or requires knowledge beyond SQL; the commonest cases involve creating or altering C language code. In the above cases, the page's explanatory text should help. Square brackets ([ and ]) create optional groups. Pointy braces ({ and }) create required groups. To date, only alternative lists exist inside braces. Parentheses (( and )) are to be taken literally as part of the SQL code, but also group parts. The bar or pipe (|) is the alternator, it separates lists of alternatives which require one choice. The ellipsis (...) is the basic repeater, all repeaters indicate some repetition of the prior group, symbol or word. The basic repeater requires at least one repetition. The ellipsis in square brackets ([ ... ]) indicates an optional repetition. The other repeaters are special usages of square brackets to create repeaters that contain a separator that goes between the repetitions. These are ([, ...]), ([ OR ...]) and ([ AND ...]). PL/pgSQL XXX See SQL above. PL/Tcl ... PL/Perl ... PL/Python ...