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

Re: foreign data wrappers

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Zheng Yang <zhengyang4k(at)gmail(dot)com>
Cc: Selena Deckelmann <selena(at)chesnok(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-students(at)postgresql(dot)org
Subject: Re: foreign data wrappers
Date: 2011-03-24 07:54:42
Message-ID: 4D8AF8C2.3000007@lelarge.info (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-students
Hi,

Le 24/03/2011 06:39, Zheng Yang a écrit :
> [...]
> I've figured out what a FDW does. It's quite clear from the doc that a FDW is an interface postgresql database used to communicate with
> other data sources either it be a file, another DBMS or even weblinks  (please correct me if i am wrong).
> 

You're right.

> I have a few more specific questions on FDW. hope you guys can help!
> 
> 1) by right the FDW should be implemented by the vendor of the datasource, is that correct? 
> 

If you mean that an Oracle FDW should be implemented by Oracle, and an
Excel FDW should be implemented by Microsoft, then no, I don't think so.
AFAICS, anyone can write any FDW.

> 2) what are the FDW that has been implemented? I've seen an plain file FWD module from the link provided by selena.
> 

Yeah, that's the one provided as a contrib module. I've also seen a
postgres one and a twitter one on pgsql-hackers. Andrew wrote two other
FDWs he'll talk about today at PGEast
(http://people.planetpostgresql.org/andrew/index.php?/archives/163-First-extension.html).
I hope he'll publish his slides somewhere really soon :)

> 3) in one of the examples, when declaring an FDW,  "..LIBRARY ’foosql_fdw.so’ LANGUAGE C;"  the LANGUAGE option is going to be C only?
> 

According to
http://developer.postgresql.org/pgdocs/postgres/fdwhandler.html, yes.

> 4) Is theFDW something similar to the Mysql storage engine architecture?
> 

Not really.

> 5) for the datalink, the doc has mentioned about it's going to be OS dependent. but i dun quite understand how does the kernel module and LD_PRELOAD will work in this case, esp.LD_PRELOAD.
> 

No idea.

Writing some FDWs would make a really good GSoC project.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

In response to

Responses

pgsql-students by date

Next:From: Zheng YangDate: 2011-03-24 08:49:19
Subject: Re: foreign data wrappers
Previous:From: Zheng YangDate: 2011-03-24 05:39:45
Subject: Re: foreign data wrappers

pgsql-general by date

Next:From: Viliam ĎurinaDate: 2011-03-24 08:04:25
Subject: Problem calling setweight function from JDBC
Previous:From: John R PierceDate: 2011-03-24 07:48:15
Subject: Re: Database recovery.

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