Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id AA9B11337B96 for ; Thu, 24 Mar 2011 04:54:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 73519-02 for ; Thu, 24 Mar 2011 07:54:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 9F8511337B83 for ; Thu, 24 Mar 2011 04:54:43 -0300 (ADT) Received: from [192.168.10.3] (ASte-Genev-Bois-153-1-85-140.w81-48.abo.wanadoo.fr [81.48.35.140]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id BA2D43B8F5; Thu, 24 Mar 2011 08:54:42 +0100 (CET) Message-ID: <4D8AF8C2.3000007@lelarge.info> Date: Thu, 24 Mar 2011 08:54:42 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Zheng Yang CC: Selena Deckelmann , Andrew Dunstan , pgsql-students@postgresql.org Subject: Re: foreign data wrappers References: <690867AB-C50B-4354-91D0-8A0811639C4C@gmail.com> <4D879CD0.5030803@dunslane.net> <3EF9E4CC-CF42-4B45-86FF-4CB9D46D7442@gmail.com> In-Reply-To: <3EF9E4CC-CF42-4B45-86FF-4CB9D46D7442@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/20 X-Sequence-Number: 161 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