Re: patch: SQL/MED(FDW) DDL

From: SAKAMOTO Masahiko <sakamoto(dot)masahiko(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch: SQL/MED(FDW) DDL
Date: 2010-09-16 06:15:36
Message-ID: 4C91B608.5040606@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2010/09/16 11:20), Itagaki Takahiro wrote:
> 2010/9/15 Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com>:
>> The API needs to be simple and version-independent, so that you can
>> write simple wrappers like the flat file wrapper easily. At the same
>> time, it needs to be very flexible, so that it allows safely pushing
>> down all kinds constructs like functions, aggregates and joins. The
>> planner needs to know which constructs the wrapper can handle and get
>> cost estimates for the foreign scans. Those two goals are at odds.
>
> The patch didn't say nothing about the API design, no?
> It just implement FOREIGN TABLE commands in the SQL standard,
> and we need the part anyway if we want to support the standard.

you are right, sorry. Attached includes
- FDW routine interface and
- FDW implementation of FDW for external PostgreSQL.
This should be patched after the previous patch.

This is designed to be used in the executor module.
The API has some simple interfaces, such as FreeConnection,
Open, Iterate, Close, ReOpen, and OnError.

In this current FDW implementation for external PG,
It can push-down WHERE-clause by reconstructing query
that shouled be sent to the foreign server.

I think this FDW routine interface is simple, but
extension develpers can add intelligent features to some extent.

FDW routine interface design and what this fdw-for-pg can do
is summarized in:
http://wiki.postgresql.org/wiki/SQL/MED#PostgreSQL

Regards,

SAKAMOTO Masahiko
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
e-mail: sakamoto(dot)masahiko(at)oss(dot)ntt(dot)co(dot)jp

Attachment Content-Type Size
fdw_select20100916.patch.gz application/x-gzip 45.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message SAKAMOTO Masahiko 2010-09-16 06:30:02 Re: patch: SQL/MED(FDW) DDL
Previous Message David Fetter 2010-09-16 06:07:09 Day 01/31