Re: review: FDW API - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: review: FDW API
Date
Msg-id AANLkTi=CYoGDTfXhM+zYXyspmLry5itTZsQKE94uUJrU@mail.gmail.com
Whole thread Raw
In response to Re: review: FDW API  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Jan 22, 2011 at 07:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> * I wonder if CREATE FOREIGN DATA WRAPPER should automatically create
>> the handler function, if it doesn't exist yet.
>
> Doing that would require the equivalent of pg_pltemplate for FDWs, no?
> I think we're a long way from wanting to do that.  Also, it seems to me
> that add-on FDWs are likely to end up getting packaged as extensions,

The proposed file_fdw.sql actually creates a default FDW on installation.
So I think the installation scripts work as a template even if we don't
have FDW template catalogs.

+ /* contrib/file_fdw/file_fdw.sql.in */
+ -- create wrapper with validator and handler
+ CREATE OR REPLACE FUNCTION file_fdw_validator (text[], oid)
+ CREATE OR REPLACE FUNCTION file_fdw_handler ()
+ CREATE FOREIGN DATA WRAPPER file_fdw
+ VALIDATOR file_fdw_validator HANDLER file_fdw_handler;

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Include WAL in base backup
Next
From: Pavel Stehule
Date:
Subject: Re: REVIEW: WIP: plpgsql - foreach in