Skip site navigation (1) Skip section navigation (2)

Function scan push-down using SQL/MED syntax

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-cluster-hackers(at)postgresql(dot)org
Subject: Function scan push-down using SQL/MED syntax
Date: 2010-03-04 04:52:19
Message-ID: 20100304135219.4D4A.52131E4D@oss.ntt.co.jp (view raw or flat)
Thread:
Lists: pgsql-cluster-hackers
I'm working on SQL/MED foreign table for "Function scan push-down" item:
    http://wiki.postgresql.org/wiki/ClusterFeatures#Function_scan_push-down
The current research is described in:
    http://wiki.postgresql.org/wiki/SQL/MED
and the codes are in:
    http://repo.or.cz/w/pgsql-fdw.git

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.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center


Responses

pgsql-cluster-hackers by date

Next:From: Josh BerkusDate: 2010-03-04 18:08:36
Subject: Re: Function scan push-down using SQL/MED syntax
Previous:From: Takahiro ItagakiDate: 2010-03-04 03:00:52
Subject: Re: Spec discussion: Generalized Data Queue / Modification Trigger

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group