On Thu, Nov 4, 2010 at 6:04 PM, Shigeru HANADA
<hanada@metrosystems.co.jp> wrote:
> For example:
> * PRIMARY ACCESS_METHOD -> HANDLER of FOREIGN DATA WRAPPER
> * am_scancost() -> FdwRoutine.EstimateCosts()
> * am_open() -> FdwRoutine.Open()
> * am_beginscan() -> first call of FdwRoutine.Iterate()?
It might be good to have a separated "beginscan" method if we use
asynchronous scans in multiple foreign servers in one query
because multiple foreign servers can run their queries in parallel.
(Imagine that pushing-down aggregate function into each foreign server.)
I think it is different from "open" because it is called
before query execution, for example by EXPLAIN.
> * am_getnext() -> FdwRoutine.Iterate()
> * am_rescan() -> FdwRoutine.ReOpen()
> * am_close() -> FdwRoutine.Close()
> * Table descriptor -> Relation, Form_pg_class
> * Qual descriptor -> PlanState.qual
Do you think you have all counterpart methods for VTI AMs?
If so, it's a good news ;-) We could support foreign table
features as same level as Informix.
--
Itagaki Takahiro