On Mon, 31 Jan 2011 22:00:55 +0900 Shigeru HANADA <han...@metrosystems.co.jp> wrote: > I'll post FDW API patches which reflect comments first, and then I'll > rebase postgresql_fdw against them.
Sorry for late, attached are revised version of FDW API patches which reflect Heikki's comments except removing catalog lookup via IsForeignTable(). ISTM that the point is avoiding catalog lookup during planning, but I have not found when we can set "foreign table flag" without catalog lookup during RelOptInfo generation. Please apply attached patches in this order. 1) fdw_catalog_lookup.patch 2) fdw_handler.patch 3) foreign_scan.patch To execute SELECT quereis for foreign tables, you need a FDW which has valid fdwhandler function. The file_fdw which is posted in another thread "SQL/MED file_fdw" would help. Changes from last patches are: 1) Now SELECT FOR UPDATE check for foreign tables are done properly in executor phase, in ExecLockTuple(). Or such check should be done in parser or planner? 2) Server version is checked in pg_dump (>= 90100). 3) ReScan is not required now. If ReScan is not supplied, ForeignScan uses EndScan + BeginSacn instead. 4) FDW-Info in EXPLAIN is shown always, except FDW set NULL to explainInfo. Regards, -- Shigeru Hanada
fdw_catalog_lookup.patch.gz
Description: Binary data
fdw_handler.patch.gz
Description: Binary data
foreign_scan.patch.gz
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers