Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ftIih-00041q-QE for pgsql-docs@arkaria.postgresql.org; Fri, 24 Aug 2018 20:30:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ftIic-0002y7-KL for pgsql-docs@arkaria.postgresql.org; Fri, 24 Aug 2018 20:30:06 +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.89) (envelope-from ) id 1ftIic-0002y0-BB for pgsql-docs@lists.postgresql.org; Fri, 24 Aug 2018 20:30:06 +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.89) (envelope-from ) id 1ftIiU-0008D4-Pk for pgsql-docs@lists.postgresql.org; Fri, 24 Aug 2018 20:30:04 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1ftIiT-0004rN-Kl; Fri, 24 Aug 2018 16:29:57 -0400 Date: Fri, 24 Aug 2018 16:29:57 -0400 From: Bruce Momjian To: kes-kes@yandex.ru, pgsql-docs@lists.postgresql.org Subject: Re: Documentation does not cover multiple WITH in one query Message-ID: <20180824202957.GC18798@momjian.us> References: <153492989238.1378.11935777086367711326@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <153492989238.1378.11935777086367711326@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Aug 22, 2018 at 09:24:52AM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/10/static/queries-with.html > Description: > > Hi. I have found > [DOC](https://www.postgresql.org/docs/10/static/queries-with.html) > > it is fine, but did not cover multiple WITH in one query. > > I found answer only [here](https://stackoverflow.com/a/38137037/4632019) > > May you please add the example: > > WITH table1 AS (...), table2 AS (...) SELECT * FROM table1, table2 Well, the SELECT manual has: [ WITH [ RECURSIVE ] with_query [, ...] ] and with_query is shown as: with_query_name [ ( column_name [, ...] ) ] AS ( select | values | insert | update | delete ) This is standard SQL. I don't think we are going to be able to show every possible syntax. -- 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 +