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 1kLWYe-0004Sm-JV for pgsql-docs@arkaria.postgresql.org; Thu, 24 Sep 2020 19:05:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kLWYb-0008I0-Le for pgsql-docs@arkaria.postgresql.org; Thu, 24 Sep 2020 19:05:29 +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 1kLWYb-0008Ht-Ff for pgsql-docs@lists.postgresql.org; Thu, 24 Sep 2020 19:05:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLWYZ-0006e1-8Q for pgsql-docs@lists.postgresql.org; Thu, 24 Sep 2020 19:05:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 08OJ5OF41668964; Thu, 24 Sep 2020 15:05:24 -0400 From: Tom Lane To: Bruce Momjian cc: "David G. Johnston" , Guyren Howe , Pg Docs Subject: Re: Please provide examples of rows from In-reply-to: <20200924185511.GC22807@momjian.us> References: <158638264419.662.2482095087061084020@wrigleys.postgresql.org> <20200904014618.GB13932@momjian.us> <20200920003910.GA22746@momjian.us> <798909.1600562993@sss.pgh.pa.us> <20200920013846.GC22746@momjian.us> <835988.1600613834@sss.pgh.pa.us> <878265.1600625640@sss.pgh.pa.us> <20200924185511.GC22807@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Thu, 24 Sep 2020 14:55:11 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1668962.1600974324.1@sss.pgh.pa.us> Date: Thu, 24 Sep 2020 15:05:24 -0400 Message-ID: <1668963.1600974324@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > Yes, this is very helpful. I was afraid the JSON would overwhelm the > example, but this looks good. I wrote the attached doc patch which I > think improves this. I plan to apply it to all supported versions. Couple thoughts: * Taking the initial ... out of the syntax synopsis is not an improvement. It makes it look like you can only apply AS to the first function of a ROWS FROM. * I think the ORDER BY adds nothing to the example except complication and confusion. * Maybe the other sentence of explanation would read better as json_to_recordset() is instructed to return two columns, the first integer and the second text. The result of generate_series() is used directly. regards, tom lane