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 1kdrIg-0002Cy-17 for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Nov 2020 08:52:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kdrIe-0000uz-US for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Nov 2020 08:52:48 +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 1kdrIe-0000us-N5 for pgsql-hackers@lists.postgresql.org; Sat, 14 Nov 2020 08:52:48 +0000 Received: from wforward5-smtp.messagingengine.com ([64.147.123.35]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdrIa-0002RX-AQ for pgsql-hackers@postgresql.org; Sat, 14 Nov 2020 08:52:47 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id CCEA3B56; Sat, 14 Nov 2020 03:52:41 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 14 Nov 2020 03:52:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=fm1; bh=JCzCXa/hj7Eqc9HaaT3NqVoHl+0DKsC1OzKCqEyBK YU=; b=gFe2V84119biA9UAokiTeSDjHof5LGvGXBx1hyP6FJEVL258LujN5PRmk twKFinfL6SsBZZ7IztCeBroEFjpDQKuzLQla1XhyZiJsk4LDuSCEp4OQ0IVA+E7q fVydBrdgz5BO3B9KM9ujMGkAcsuPQFU4EccRFG4jyzn69/W3MSRFLmcYg2KvlE/Q 1neeAW+1TlNUrVy7+hS3y8PQ72Frut+N3HyuA1HlWx6I9hJTp8teLIxlnl8FmeD3 yjDXVaYrU11wboQ3SmnKLesifl+QDCaQfrcqYJaPgmzQ9w38Ctj+Qt8UrF8IpxAg PBkJZAEvRqAollbecZVsKzqwmPGOw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddviedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnh guqhhurggurhgrnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpedtveeghedtjedvvedv leejueevjeejtdellefgkeelfeeikeejlefgkedtudeuvdenucffohhmrghinhepvdhnug hquhgrughrrghnthdrtghomhenucfkphepkeejrddujeejrdejhedrleegnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghish gvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p57b14b5e.dip0.t-ipconnect.de [87.177.75.94]) by mail.messagingengine.com (Postfix) with ESMTPA id 20CED3064AA7; Sat, 14 Nov 2020 03:52:40 -0500 (EST) Subject: Re: Allow an alias to be attached directly to a JOIN ... USING To: Wolfgang Walther , Fabien COELHO References: <20190917173742.GA8735@alvherre.pgsql> <9a5c9ed2-1dd7-8c2a-6b90-0de54f4c13a1@2ndquadrant.com> <8568b66d-405d-5d83-ac8c-e107f1b9f113@2ndquadrant.com> <88018eae-d949-be66-7fec-924213213b49@technowledgy.de> Cc: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <91c3880a-de95-324d-1d75-3ed512b221b6@2ndquadrant.com> Date: Sat, 14 Nov 2020 09:52:39 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <88018eae-d949-be66-7fec-924213213b49@technowledgy.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-08-03 19:44, Wolfgang Walther wrote: > So given this: > > SELECT x.id FROM a LEFT JOIN b USING (id) AS x > > will this return NULL or a.id for rows that don't match in b? This > should definitely be mentioned in the docs and I guess a test wouldn't > be too bad as well? This issue is independent of the presence of the alias "x", so I don't think it has to do with this patch. There is a fair amount of documentation on outer joins, so I expect that this is discussed there. -- Peter Eisentraut 2ndQuadrant, an EDB company https://www.2ndquadrant.com/