I'm working on SQL/MED foreign table for "Function scan push-down" item:
The current research is described in:
and the codes are in:
The present codes consist of two parts:
1. Foreign table syntax, catalog, and connection manager in the core.
2. contrib/postgresql_fdw extension module.
SQL/MED could take on some part of dblink and PL/Proxy. Also, it requires
the same issues with pgpool where to execute functions, local or remote.
The major part of the proposal is that table functions (SRF) should have
an ability to access ScanState during execution because ScanState has
filtering conditions. Foreign Data Wrappers can re-constract a SQL query
from the conditions and send the query to the external server.
The current design is very similar to "Executor node hook".
ExecXxxForeignScan() almost pass-through the processing to each FDW
routine. SQL-based FDWs can push-down the conditions to their foreign
servers. Also, plain data FDWs (including CSV-FDW) can give over
the filtering to the default executor.
Comments and suggestions are very welcome for the design and implementation.
There are also some known issues in the Open questions section.
NTT Open Source Software Center
pgsql-cluster-hackers by date
|Next:||From: Josh Berkus||Date: 2010-03-04 18:08:36|
|Subject: Re: Function scan push-down using SQL/MED
|Previous:||From: Takahiro Itagaki||Date: 2010-03-04 03:00:52|
|Subject: Re: Spec discussion: Generalized Data Queue / Modification Trigger|