Re: WIP: parameterized function scan

From: Antonin Houska <antonin(dot)houska(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: parameterized function scan
Date: 2012-05-23 22:01:52
Message-ID: 4FBD5E50.1020301@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-05-23 22:46:53 Re: WIP: parameterized function scan
Previous Message Tom Lane 2012-05-23 21:21:37 Re: Archiver not exiting upon crash