FDW: ForeignPlan and parameterized paths

Поиск
Список
Период
Сортировка
От Ronan Dunklau
Тема FDW: ForeignPlan and parameterized paths
Дата
Msg-id 2203777.1rRRJ3vjOC@ropc
обсуждение исходный текст
Ответы Re: FDW: ForeignPlan and parameterized paths
Список pgsql-hackers
Hello.

I've noticed that,  when implementing a FDW, it is difficult to use a plan which 
best path is a parameterized path. This comes from the fact that the 
parameterized clause is not easily available at plan time.

This is what I understood from how it works:

- The clauses coming from the best path restrictinfo are not available in the 
scan_clauses argument to the GetForeignPlan function.

- They are, however, directly available on the path, but at this point the 
clauses are of the form InnerVar OPERATOR OuterVar. The outer Var node is then 
replaced by a Param node, using the replace_nestloop_params function.

It could be useful to make the "parameterized" version of the clause (in the 
form InnerVar OPERATOR Param) available to the fdw at plan time.

Could this be possible ?
Maybe by replacing the clauses on the restrictinfo nodes from the path param 
info by the "parameterized" clauses, and then adding these to the scan clauses 
passed to GetForeignPlan ?

Regards,

--
Ronan Dunklau



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: [PERFORM] Slow query: bitmap scan troubles
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Set visibility map bit after HOT prune