Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j9lCL-0002cp-NV for pgsql-docs@arkaria.postgresql.org; Thu, 05 Mar 2020 07:45:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9lCK-0001Cg-8V for pgsql-docs@arkaria.postgresql.org; Thu, 05 Mar 2020 07:45:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j9lCK-0001CY-0J for pgsql-docs@lists.postgresql.org; Thu, 05 Mar 2020 07:45:36 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9lCD-0005pN-Lm for pgsql-docs@lists.postgresql.org; Thu, 05 Mar 2020 07:45:35 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 617EF22247; Thu, 5 Mar 2020 02:45:28 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 05 Mar 2020 02:45:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=oYJaIW9KDvyo0Q65q58eyPAKCfS rw1ouh1o5wPXbJSw=; b=THv/+eYLR/d1sx/HEtBQ86eNPNBWNnWtMKOU0gPQTuR TgVazErHg7F/AFsiAArxM6od9xhg2xnAPCUcgK+EuOYzNCL+PndKDsSqEFJoeuPq RQxDM6unzNpTE1vhqu+ECCjvX5pBqAiuuoPE5jjW1vahJTzpg/vJEhzfuIGRulSW oovo3F0zmKygpLRqpBq6VNBf8MEB5LNSO9zKXi9R10gsuFgTg/CUo6QTn1AwYyBz QXYCUs72wRob5yqCRbjKm6blduyoLyQ8TRsaftOTIQTEFIlwQm+KdfPRw/rlKm6O VfdOWtwqBOk5LDwf8QmrajAqMujhIpn32bc8+ndEJOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=oYJaIW 9KDvyo0Q65q58eyPAKCfSrw1ouh1o5wPXbJSw=; b=T/XiDe/jxxZQ0LfGXXbSQx g7yg9rHxKq6cimyQaNtIHQIq6niPyDWemvuWgP/DBAIw/BDPbJZ0XbInclMFzR4Z 2Squz/jRI+M7lyPtUazyKOjFhReS/qISsjOd8qgZCtvSZnOyQyOfpRSTBkVjxSL+ iW52hd2/55Ax5DMlkYP11GkOW0uy7YvvqRfEOy06xmKFrDi0RwZHYkZxng/S4Lc6 KHjx3Lg2mqWyyKjVhuKLUM3sbgGfBEzRbTB9VwlCi+5mxW+r1okEdEdNKBHRbMs5 VkfHESHwaTltfhuJc0jxqSK7ojlFjmWZT8abt5sr+XfUt2zH5pmm0kb8d1wHRfMA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddtledgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepff fhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecukfhppeduuddurd dutddvrddukedtrddukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 287FE3060F09; Thu, 5 Mar 2020 02:45:26 -0500 (EST) Date: Thu, 5 Mar 2020 16:45:23 +0900 From: Michael Paquier To: axykon@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Possible typos in the #12.1.1 examples Message-ID: <20200305074523.GX2593@paquier.xyz> References: <158316348159.30450.16075357948244298217@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="78WCQgNEg63vc82l" Content-Disposition: inline In-Reply-To: <158316348159.30450.16075357948244298217@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --78WCQgNEg63vc82l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 02, 2020 at 03:38:01PM +0000, PG Doc comments form wrote: > Seems like here the example missed 'm' as an alias and a dot in the `wher= e` > clause: > ... messages m > ... m.id =3D 12; This query is valid as-is. > SELECT m.title || ' ' || m.author || ' ' || m.abstract || ' ' || d.body AS > document > FROM messages m, docs d > WHERE mid =3D did AND mid =3D 12; >=20 > Possibly, the example missed dots:=20 > ... m.id =3D d.id AND m.id =3D 12; This one is actually valid as well, as long as both relations don't use the same column names, but I can see your point to add the aliases to the quals of the WHERE clause to bring more clarity. -- Michael --78WCQgNEg63vc82l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl5grhMACgkQnvQgOdby QH0RqxAAmvHdewNQ/O6YT93ja98bnQI1/HkbxT3rrR5vSIAyer8KPEZiAaSxyFy4 oAyUXEp3CnoNxNCF8ZQ7RaFp6VF1td/BGx4HZ+wn88+uo7TS+pk2NLEqs4hRWl4E pOI3GuKzuUgx5YCtF5VQYXZZdskohaLd2J/DP8GkyZrw/K3H8w2ZqFKTXak4y8+2 kM2NK7HPiZ9Jhf+GjqfrCGFomAkF332hqbgQwamc8uDM85mZ+i6rUE5UAiNkZdj/ Y0FZODA5GFClvuEU85vL/OEBrlRjhPOpszgKqFlXAOhXuZtFyApg4nVY6R+UN7u2 YqaGdvIymOrgl9EL4J3ztcjj8hS6SqfE/Ze1v7XzWQ//P60wwibWRDH//czFPeLM vRnEk5azfaEy+++JNvKJP1zRpfV0TK7B43uaD+Nh+UjDx7xtngKBZsYnGAVs9MaC 7YS+ra/quvcxhht/uXMaUj113t2Th5H915m0X1AHAm16UPEOkkaUCmlJ9Rfg/HT6 AnopmNUowe/L+4hXyiizYA0/PWzluO0aiIfWDYTMPQ0ZIKc3qxVvd0NYveV9N0en 6duupONhzk154A2U4lQPGvcjJca2qFfi5NrvTDZx6ipHZT52pchRo0GeJqClT9IJ tF2SY2EmNAP0zKphalEORiy2H0k2spEGtDuuENt8PnZcZCJQdbM= =NojI -----END PGP SIGNATURE----- --78WCQgNEg63vc82l--