Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avDDE-00066Q-8X for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Apr 2016 00:20:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1avDDD-0004vY-NG for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Apr 2016 00:20:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1avDDD-0004uv-28 for pgsql-bugs@postgresql.org; Wed, 27 Apr 2016 00:20:15 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1avDD9-0001jM-6N for pgsql-bugs@postgresql.org; Wed, 27 Apr 2016 00:20:13 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1avDD8-0001Vf-7B; Tue, 26 Apr 2016 20:20:10 -0400 Date: Tue, 26 Apr 2016 20:20:10 -0400 From: Bruce Momjian To: "David G. Johnston" Cc: Manlio Perillo , "pgsql-bugs@postgresql.org" Subject: Re: BUG #14016: Incomplete documentation of IN subquery expression Message-ID: <20160427002010.GC13058@momjian.us> References: <20160311163928.6674.94707@wrigleys.postgresql.org> <20160426202737.GA13058@momjian.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Apr 26, 2016 at 02:00:39PM -0700, David G. Johnston wrote: > On Tue, Apr 26, 2016 at 1:27 PM, Bruce Momjian wrote: > > >>>Note: This form of IN is not truly a subquery expression, but it seems > best > > to document it in the same place as subquery IN. > > Does the attached patch improve this? > > > ​I'd append "scalar" to the id to distinguish in from the subquery version.  > Otherwise any suggest I make seems like overkill.  The main point being the > "list of scalars" is not a term we use on the referenced page, and the chapter > header indicates "Row and Array" of which this is similar but technically > neither.​ > > ​ [...]​ > > [...] rely on the ​array > form of [...]​ Sorry, there was already a link in that place --- I had linked to the wrong spot. New patch attached. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + --vGgW1X5XWziG23Ko Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="in.diff" diff --git a/doc/src/sgml/ref/values.sgml b/doc/src/sgml/ref/values.sgml new file mode 100644 index 0fb3cd7..f91ceb0 *** a/doc/src/sgml/ref/values.sgml --- b/doc/src/sgml/ref/values.sgml *************** WHERE ip_address IN (VALUES('192.168.0.1 *** 219,225 **** For simple IN tests, it's better to rely on the ! list-of-scalars form of IN than to write a VALUES query as shown above. The list of scalars method requires less writing and is often more efficient. --- 219,226 ---- For simple IN tests, it's better to rely on the ! list-of-scalars form ! of IN than to write a VALUES query as shown above. The list of scalars method requires less writing and is often more efficient. --vGgW1X5XWziG23Ko Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --vGgW1X5XWziG23Ko--