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 1lLdGz-0008SN-3o for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Mar 2021 02:48:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lLdGx-0004Rf-RJ for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Mar 2021 02:47:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lLdGx-0004RX-I1 for pgsql-hackers@lists.postgresql.org; Mon, 15 Mar 2021 02:47:59 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lLdGr-0001X1-1t for pgsql-hackers@lists.postgresql.org; Mon, 15 Mar 2021 02:47:58 +0000 Received: by mail-io1-xd32.google.com with SMTP id y20so13544063iot.4 for ; Sun, 14 Mar 2021 19:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gr6IVNitIuMSaxud0wa0V61TuCdNRgdT/L2tbW6W/G8=; b=Egtp8THgPrmUZjWDXCII/nQRxdx8V35hI2nz+Jv7YjM7OubUGWMfjkGZqSEEdR6E5K cb+XDYmoY0E7nolUKaddCr69KE2CtznWwW5MstlkiNpDQv8s6TchZNL+sO43wdFv0K7j hdyfFw+8BAQMFxGVPNeWUtDCUQwP8UqGqs//V8r9QsZABecEjZBZ9+AFgfVALiPYxBiu VbCA+tf0KG/K7jpgNi57BduK3KzywIRwWncgxduoe9uG5qYKMLOnWcZGqJ/Hz6ZmpV5M JJEst9HWAE/HFUTS7fHLuUTaBNM+dzH9WJ+4Tkf9jfzoSzSGmKJBxwN5jRTTV9KNHyu6 xDjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gr6IVNitIuMSaxud0wa0V61TuCdNRgdT/L2tbW6W/G8=; b=i7YugYL87iq6L+baatAW8+ExlwUnFvkRGoNlxiiWdYSZpdWm4Kiw+SmFz+I+vx2xuM OzdOwnFI5d/TB9GaAS42dhJFoHYsLPjt7Vyws5saJnzonQHJJDljaBXaoWjX+OiJiLZl dXXVNZenw0EgXVmMX2Otw3y7KRukz2nAbwNRSPYm96DUTDvryEl8D8FCOHMDOjvQUFYJ oohNNrFoPMUxIfLIPYJ5viTp+G6eI+VMj7rTZwXZLY7UFCLgkQa68ElK/T2kE1QwFcuT gElwdb3mStHxd7cBWBsosygjpIdEKnSuyCHS+QWBjhE0QAO6knHQLBEv6ubgLZI8ZJRu R5cQ== X-Gm-Message-State: AOAM533kgxQrBXBtRpe13WVWcAq3y02kXynxPuI3u5BMZnpyAnsdu8Zk +yLeluQbdb+3/s92KaLjLh+92UTiv6mkgCH57Jg= X-Google-Smtp-Source: ABdhPJxw9ZB7Ko0uqxb469dHIoSML4NmuIhaiujzpvTJk6x3nXcIFDFOdthIsxhdMtW37ZErfVIogl6pVQGNehOdGg8= X-Received: by 2002:a5e:d61a:: with SMTP id w26mr5973957iom.40.1615776471401; Sun, 14 Mar 2021 19:47:51 -0700 (PDT) MIME-Version: 1.0 References: <158996922318.7035.10603922579567326239@wrigleys.postgresql.org> <81d5be9d-aa6f-f181-bea9-5a852b876cad@purtz.de> <160676553158.7563.8055833766353450366.pgcf@coridan.postgresql.org> <9a3ce766-81e9-aa13-3cf3-793e52375df8@purtz.de> <81898782-7e51-30d1-b22b-09809085f534@pgmasters.net> In-Reply-To: <81898782-7e51-30d1-b22b-09809085f534@pgmasters.net> From: Thomas Munro Date: Mon, 15 Mar 2021 15:47:15 +1300 Message-ID: Subject: Re: Change JOIN tutorial to focus more on explicit joins To: David Steele Cc: =?UTF-8?Q?J=C3=BCrgen_Purtz?= , Peter Eisentraut , PostgreSQL Hackers , "David G. Johnston" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 11, 2021 at 2:06 AM David Steele wrote: > On 12/1/20 3:38 AM, J=C3=BCrgen Purtz wrote: > > OK. Patch attached. + Queries which access multiple tables (including repeats) at once are c= alled I'd write "Queries that" here (that's is a transatlantic difference in usage; I try to proofread these things in American mode for consistency with the rest of the language in this project, which I probably don't entirely succeed at but this one I've learned...). Maybe instead of "(including repeats)" it could say "(or multiple instances of the same table)"? + For example, to return all the weather records together with the location of the + associated city, the database compares the city column of each row of the weather table with = the name column of all rows in the cities table, and select the pairs of rows where these values match. Here "select" should agree with "the database" and take an -s, no? + This syntax pre-dates the JOIN and ON + keywords. The tables are simply listed in the FROM= , + comma-separated, and the comparison expression added to the + WHERE clause. Could we mention SQL92 somewhere? Like maybe "This syntax pre-dates the JOIN and ON keywords, which were introduced by SQL-92". (That's a "non-restrictive which", I think the clue is the comma?)