Re: WIP: parameterized function scan - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: WIP: parameterized function scan
Date
Msg-id 4FBD5E50.1020301@gmail.com
Whole thread Raw
In response to Re: WIP: parameterized function scan  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: WIP: parameterized function scan
List pgsql-hackers
On 05/22/2012 09:31 PM, Robert Haas wrote:
> This implementation looks different than I'd expect: I would have 
> thought that it would work by generating paths with param_info set to 
> the appropriate set of rels to provide the necessary values, rather 
> than inventing its own mechanism for forcing a nestloop.
My consideration was something like: clauses are responsible for the 
fact that parameter info is path-specific. However function parameters 
have little to do with clauses, so they should be treated rather 
separate, at higher level than that of individual paths.

Looking at the code again, I admit there's yet no strong reason not to 
use the existing 'parameterization infrastructure'. I'll try to think up 
something better.

> Also, I think we will want something that implements the LATERAL() 
> syntax, rather than just removing the prohibition on lateral references. 

So you think it's not good to first implement (implicitly) lateral 
functions and add the explicit LATERAL() operator later, when the 
optimizer can handle lateral subqueries too? (explicit LATERAL() that 
only can take function as the argument and not subquery sounds weird).

I personally need the lateral functions much more than lateral 
subqueries, but I have no impression of the attitude of (majority of) 
other users.

While I believe I'm (slowly though) approaching a viable concept of 
lateral functions, it's quite clear to me that the lateral subqueries 
are obviously a bigger challenge.

These are  both the reasons why I started to think about the functions 
as a separate patch.


Tony H.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Archiver not exiting upon crash
Next
From: Tom Lane
Date:
Subject: Re: WIP: parameterized function scan