Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A77A21337B69 for ; Thu, 24 Mar 2011 02:40:05 -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 26800-01 for ; Thu, 24 Mar 2011 05:39:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id 3D3681337B83 for ; Thu, 24 Mar 2011 02:39:55 -0300 (ADT) Received: by iwn34 with SMTP id 34so9314112iwn.19 for ; Wed, 23 Mar 2011 22:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to:x-mailer; bh=3AnvduFWk8uiAfZ3hyAzIdEuh9AnajQS0Gg9lputlCg=; b=pPrioNAXjHY4MLWR8be4Sn84alPoTF6zpze3DJeJcAG2nNS1VhR6en7cnA27tNsJGp 3SgIHT+6fZltVYzX5gwHkcY6RvHqMSCjiVjWT6tJxJy9ZveWY9u3192/2dnUsYsZWSuI 8iNyu9Tp2l4gxLsYY7QOA9Q8Y025wfxFp7X5g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=paKH3W9uNpvpJ2SINqT3sx7ltW8TW83tcyU4eGxNOL2vlglK3fiEr6e9np7z05YTWR weSWfMM2i8wJaf5PDYz0MqkcS/6gS0ffr+kM0PTVxytMLW1ZkuGMRvs2n0NLPf+qZRCt U9eJzagBW87SKU8pqkZPCJd0CCLxMRooMrpAo= Received: by 10.42.150.65 with SMTP id z1mr12129417icv.503.1300945195195; Wed, 23 Mar 2011 22:39:55 -0700 (PDT) Received: from [122.64.167.70] ([124.68.4.221]) by mx.google.com with ESMTPS id uf10sm5740356icb.17.2011.03.23.22.39.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 22:39:53 -0700 (PDT) Subject: Re: foreign data wrappers Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-233-515438408 From: Zheng Yang In-Reply-To: Date: Thu, 24 Mar 2011 13:39:45 +0800 Cc: pgsql-students@postgresql.org Message-Id: <3EF9E4CC-CF42-4B45-86FF-4CB9D46D7442@gmail.com> References: <690867AB-C50B-4354-91D0-8A0811639C4C@gmail.com> <4D879CD0.5030803@dunslane.net> To: Selena Deckelmann , Andrew Dunstan X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201103/19 X-Sequence-Number: 160 --Apple-Mail-233-515438408 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi guys, 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). 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?=20 2) what are the FDW that has been implemented? I've seen an plain file = FWD module from the link provided by selena. 3) in one of the examples, when declaring an FDW, "..LIBRARY = =92foosql_fdw.so=92 LANGUAGE C;" the LANGUAGE option is going to be C = only? 4) Is theFDW something similar to the Mysql storage engine architecture? 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. That's the question so far. Thanks very much! Regards, Zheng Yang On 22-Mar-2011, at 3:49 AM, Selena Deckelmann wrote: > On Mon, Mar 21, 2011 at 11:45 AM, Andrew Dunstan = wrote: >=20 >> Yes, but 9.1 *has* actual FDWs. The best thing to do (other than = attending >> my talk on Thursday :-) ) >=20 > :) I'll be around, so hopefully I can attend your talk and post up = some notes! >=20 >> is to look at the file_fdw module in git head, to >> see an actual working example. >=20 > I figured if I posted some wrong information someone would respond! :) >=20 > Zheng - here is a link to the existing code: > = http://git.postgresql.org/gitweb?p=3Dpostgresql.git;a=3Dtree;f=3Dcontrib/f= ile_fdw >=20 > -selena >=20 > --=20 > http://chesnok.com --Apple-Mail-233-515438408 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Hi = guys,

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).

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? 

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

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

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

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.

That's the = question so far. Thanks very = much!

Regards,
Zheng = Yang



On = 22-Mar-2011, at 3:49 AM, Selena Deckelmann wrote:

On = Mon, Mar 21, 2011 at 11:45 AM, Andrew Dunstan <andrew@dunslane.net> = wrote:

Yes, but 9.1 *has* actual FDWs. = The best thing to do (other than attending
my talk on Thursday :-) )

:) I'll be = around, so hopefully I can attend your talk and post up some = notes!

is to look at the file_fdw = module in git head, to
see an = actual working example.

I figured if I posted some = wrong information someone would respond! :)

Zheng - here is a = link to the existing code:
http://git.postgresql.org/gitweb?p=3Dpostgresql.git;a=3Dt= ree;f=3Dcontrib/file_fdw

-selena

-- =
http://chesnok.com

= --Apple-Mail-233-515438408--