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: (view raw, whole thread or download thread mbox)
Lists: pgsql-cluster-hackers
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.

Takahiro Itagaki
NTT Open Source Software Center


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-2017 The PostgreSQL Global Development Group