Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAHSH-00049H-Nh for pgsql-bugs@arkaria.postgresql.org; Mon, 15 May 2017 14:58:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dAHSH-00066v-AS for pgsql-bugs@arkaria.postgresql.org; Mon, 15 May 2017 14:58:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAHRa-0004R1-Qy for pgsql-bugs@postgresql.org; Mon, 15 May 2017 14:57:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAHRW-00075q-Rg for pgsql-bugs@postgresql.org; Mon, 15 May 2017 14:57:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4FEvkiK014110; Mon, 15 May 2017 10:57:46 -0400 From: Tom Lane To: "David G. Johnston" cc: Sebastion Calbaza , "pgsql-bugs@postgresql.org" Subject: Re: BUG #14648: counts for queries using array unnesting is incorrect In-reply-to: References: <20170512130033.1796.93117@wrigleys.postgresql.org> <18166.1494598847@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Mon, 15 May 2017 07:51:50 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14108.1494860266.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 15 May 2017 10:57:46 -0400 Message-ID: <14109.1494860266@sss.pgh.pa.us> X-Pg-Spam-Score: -1.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 "David G. Johnston" writes: > Yes, its intentional, and it isn't specific to just the unnest function so > documenting it just there doesn't seem correct. I don't know where it is > documented but I suspect that even just reading the documentation for this > would be of minimal help - I think its likely best learned after > experiencing the aforementioned problem. https://www.postgresql.org/docs/current/static/xfunc-sql.html#XFUNC-SQL-FUN= CTIONS-RETURNING-SET The last example in section 36.4.8 covers this specifically. I've felt more than once that having these sorts of details about function semantics underneath the "extending SQL" chapter isn't right, but I'm not sure what organization would be better. A lot of the examples would be tough to do without use of custom-made functions. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs