pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Sebastion Calbaza <sebastian.calbaza@hgdata.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14648: counts for queries using array unnesting is incorrect
Date: Mon, 15 May 2017 10:57:46 -0400
Message-ID: <14109.1494860266@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYRNvL3xR2NOm9V=9G1LRpLcAc5a=6Du-NbVkXa3UU6ow@mail.gmail.com>
References: <20170512130033.1796.93117@wrigleys.postgresql.org>
	<18166.1494598847@sss.pgh.pa.us>
	<CAHTsN0eawXJ1XvzekGHfk7jCSX-G9-WfXKM4VpyWDTkMmAob1g@mail.gmail.com>
	<CAKFQuwbOPohNb=Ya_VsHGmL2-4t2-7F2MCMQGWQD+11O2JrgwA@mail.gmail.com>
	<CAHTsN0cJCjt1qGSvDLSopQoG6rq1ruCEkCNhQHUTwf23KcN8NA@mail.gmail.com>
	<CAKFQuwYRNvL3xR2NOm9V=9G1LRpLcAc5a=6Du-NbVkXa3UU6ow@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"David G. Johnston" <david.g.johnston@gmail.com> 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-FUNCTIONS-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (7+ messages)

Message-ID: <14109.1494860266@sss.pgh.pa.us>
Permalink:  ../14109.1494860266@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14109.1494860266@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, sebastian.calbaza@hgdata.com
  Subject: Re: BUG #14648: counts for queries using array unnesting is incorrect
  In-Reply-To: <14109.1494860266@sss.pgh.pa.us>
  References: <20170512130033.1796.93117@wrigleys.postgresql.org> <18166.1494598847@sss.pgh.pa.us> <CAHTsN0eawXJ1XvzekGHfk7jCSX-G9-WfXKM4VpyWDTkMmAob1g@mail.gmail.com> <CAKFQuwbOPohNb=Ya_VsHGmL2-4t2-7F2MCMQGWQD+11O2JrgwA@mail.gmail.com> <CAHTsN0cJCjt1qGSvDLSopQoG6rq1ruCEkCNhQHUTwf23KcN8NA@mail.gmail.com> <CAKFQuwYRNvL3xR2NOm9V=9G1LRpLcAc5a=6Du-NbVkXa3UU6ow@mail.gmail.com> <14109.1494860266@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox