Re: patch: SQL/MED(FDW) DDL - Mailing list pgsql-hackers

From SAKAMOTO Masahiko
Subject Re: patch: SQL/MED(FDW) DDL
Date
Msg-id 4C91B608.5040606@oss.ntt.co.jp
Whole thread Raw
In response to Re: patch: SQL/MED(FDW) DDL  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Responses Re: patch: SQL/MED(FDW) DDL  (SAKAMOTO Masahiko <sakamoto.masahiko@oss.ntt.co.jp>)
Re: patch: SQL/MED(FDW) DDL  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
(2010/09/16 11:20), Itagaki Takahiro wrote:
> 2010/9/15 Heikki Linnakangas<heikki.linnakangas@enterprisedb.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.masahiko@oss.ntt.co.jp


Attachment

pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Day 01/31
Next
From: SAKAMOTO Masahiko
Date:
Subject: Re: patch: SQL/MED(FDW) DDL