Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-18 Thread Tom Lane
Andres Freund writes: > On 2017-04-17 19:26:11 -0400, Tom Lane wrote: >> If we are going to go down this road, I think it would be a good idea >> to try to provide a cursor position for the "can't accept a set" error >> message, because otherwise it will be really unclear

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-17 Thread Andres Freund
On 2017-04-17 19:26:11 -0400, Tom Lane wrote: > I wrote: > > I'm a bit inclined to agree with the idea of explicitly requiring SRFs > > in FROM to appear only at the top level of the expression. > > If we are going to go down this road, I think it would be a good idea > to try to provide a cursor

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-17 Thread Tom Lane
I wrote: > I'm a bit inclined to agree with the idea of explicitly requiring SRFs > in FROM to appear only at the top level of the expression. If we are going to go down this road, I think it would be a good idea to try to provide a cursor position for the "can't accept a set" error message,

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-13 Thread Tom Lane
Robert Haas writes: > So I'm not sure what the right thing to do here is. Andres' points about composite vs noncomposite function result types seem pretty compelling: we could make the behavior better for scalar results, but if it then diverges from what happens for

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-13 Thread Andres Freund
On 2017-04-13 12:53:27 -0400, Robert Haas wrote: > On Wed, Apr 12, 2017 at 6:58 PM, Andres Freund wrote: > > This yields plenty weird behaviour in < v10. E.g. the following is > > disallowed: > > SELECT * FROM int4mul(generate_series(1,3), 1); > > ERROR: 0A000: set-valued

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-13 Thread Robert Haas
On Wed, Apr 12, 2017 at 6:58 PM, Andres Freund wrote: > This yields plenty weird behaviour in < v10. E.g. the following is > disallowed: > SELECT * FROM int4mul(generate_series(1,3), 1); > ERROR: 0A000: set-valued function called in context that cannot accept a > set >

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-12 Thread Andres Freund
On 2017-04-05 09:39:37 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-04-05 02:47:55 -0400, Noah Misch wrote: > >> [Action required within three days. This is a generic notification.] > > > I've a very preliminary patch. I'd like to only start polishing it up > >

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-05 Thread Noah Misch
On Wed, Apr 05, 2017 at 12:16:25AM -0700, Andres Freund wrote: > On 2017-04-05 02:47:55 -0400, Noah Misch wrote: > > On Fri, Mar 10, 2017 at 11:49:46AM -0800, Andres Freund wrote: > > > On 2017-03-09 13:34:22 -0500, Robert Haas wrote: > > > > On Mon, Jan 30, 2017 at 6:54 PM, Tom Lane

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-05 Thread Tom Lane
Andres Freund writes: > On 2017-04-05 02:47:55 -0400, Noah Misch wrote: >> [Action required within three days. This is a generic notification.] > I've a very preliminary patch. I'd like to only start polishing it up > once the code freeze is over, so I can work on getting

Re: [HACKERS] Re: Query fails when SRFs are part of FROM clause (Commit id: 69f4b9c85f)

2017-04-05 Thread Andres Freund
On 2017-04-05 02:47:55 -0400, Noah Misch wrote: > On Fri, Mar 10, 2017 at 11:49:46AM -0800, Andres Freund wrote: > > On 2017-03-09 13:34:22 -0500, Robert Haas wrote: > > > On Mon, Jan 30, 2017 at 6:54 PM, Tom Lane wrote: > > > > Andres Freund writes: > > >