Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 2281B1337B6E for ; Fri, 25 Mar 2011 23:24:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 34412-01 for ; Sat, 26 Mar 2011 02:23:59 +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 3DFD21337B61 for ; Fri, 25 Mar 2011 23:23:57 -0300 (ADT) Received: by iwn34 with SMTP id 34so1666366iwn.19 for ; Fri, 25 Mar 2011 19:23:57 -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=bT4NdYnmw+Zybz5Pl9Ykr3je4oYcNjoQU54afa+Dunk=; b=vhExcoDTw12NkVqQCdVUom/rSag1hm6BLEpMgkIY97ang0mre1XZJVPct+lPK/JqYJ DObQoyRBGjF75gJOe5o1LW/0c/7+rUeplL/aeN+ZJF+SN5TFKS0/arwcFkUS2aIbc6ZU NCOBWB6NY+J7KZHZYig+afa292TdxQgU7GhXg= 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=pICcai12fmYNA5+OGo4F6K1ZGJx9d1AjoAWl61QN+pkKoVoNHIApTb1CCb0R46zvr9 3J6n8lOHVa5nykz9W/WlyaS2bWROQsszvhj48eFUUURY8K9Jh8vOSTle1k7AYojPP+s9 Skt1uqx8pgsqdN5FOa0RjsCRlCt0XL1Bly95M= Received: by 10.43.45.198 with SMTP id ul6mr2354440icb.449.1301106237732; Fri, 25 Mar 2011 19:23:57 -0700 (PDT) Received: from [122.64.185.49] ([61.158.124.225]) by mx.google.com with ESMTPS id wo11sm987742icb.8.2011.03.25.19.23.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2011 19:23:55 -0700 (PDT) Subject: Re: foreign data wrappers Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-1451-676480803 From: Zheng Yang In-Reply-To: Date: Sat, 26 Mar 2011 10:23:47 +0800 Cc: Shiv , Andrew Dunstan , Alvaro Herrera , Guillaume Lelarge , pgsql-students Message-Id: References: <690867AB-C50B-4354-91D0-8A0811639C4C@gmail.com> <4D879CD0.5030803@dunslane.net> <3EF9E4CC-CF42-4B45-86FF-4CB9D46D7442@gmail.com> <4D8AF8C2.3000007@lelarge.info> <4ACC318A-1B6F-49A5-9B02-49EEAF7B97C7@gmail.com> <1300985156-sup-3058@alvh.no-ip.org> <47676.208.91.122.102.1300985713.squirrel@dunslane.net> <603812A0-F464-44AE-8A90-DF9BD1DC2DB9@gmail.com> To: Selena Deckelmann X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201103/29 X-Sequence-Number: 170 --Apple-Mail-1451-676480803 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Thanks! Can anyone help on this: I wanted to check out an copy of pgsql source so that I can start = playing around with it.=20 I followed the working with git instructions here: http://wiki.postgresql.org/wiki/Working_with_Git but when I run this command: git clone git://git.postgresql.org/git/postgresql.git I get this error: Cloning into gitpostgresql... fatal: The remote end hung up unexpectedly ZY On 25-Mar-2011, at 11:38 PM, Selena Deckelmann wrote: > Hi! >=20 > On Thu, Mar 24, 2011 at 7:07 PM, Zheng Yang = wrote: >> Thanks for the slides! As what's mentioned on one of the slides, the >> datasource of FDW can be virtually everything. >> So if there were a FDW for flickr API, the examples will be something = like: >> 1) CREATE FOREIGN TABLE flickr_table (photo_id INT, ownerid INT, = photo BLOB, >> text TEXT) SERVER flick_fdw OPTIONS (api_key 'AAAA'); >> p.s. the text field is used as the keyword for free text search. >> when query from the table: >=20 > Yes, but perhaps we could name the 'text' column something like > 'search' or ... someone else could help come up with a better name. :) >=20 >> 2) SELECT photo FROM flickr_table WHERE text =3D 'panda' LIMIT 0, 10; >> This will return top ten photos relevant to 'panda'. Is my = understanding >> correct? >=20 > Yes, the first ten results. >=20 >> I've briefly gone through the slides. Regarding the 6 callbacks, is = that >> correct to say that a full table scan will always be performed = irregardless >> of the sql statement, >> the FDW is blind to the sql query performed, right? >=20 > That's correct. >=20 >> And can anyone help explain what a planner is? What does this = "provide cost >> estimates to planner" mean? Thanks! >=20 > Have a look at this for a quick overview: > http://www.postgresql.org/docs/9.0/static/planner-optimizer.html >=20 > -selena >=20 > --=20 > http://chesnok.com --Apple-Mail-1451-676480803 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii http://wiki.post= gresql.org/wiki/Working_with_Git

but when I = run this command:
git clone git://git.postgresql.org/git/po=
stgresql.git

I get this error:
Cloning = into gitpostgresql...
fatal: The remote end hung up = unexpectedly


ZY

On 25-Mar-2011, at 11:38 PM, Selena = Deckelmann wrote:

Hi!

On Thu, Mar 24, 2011 at 7:07 PM, Zheng = Yang <zhengyang4k@gmail.com> = wrote:
Thanks for the slides! As what's = mentioned on one of the slides, the
datasource of FDW can be virtually = everything.
So if there were a = FDW for flickr API, the examples will be something = like:
1) CREATE FOREIGN = TABLE flickr_table (photo_id INT, ownerid INT, photo = BLOB,
text TEXT) SERVER = flick_fdw OPTIONS (api_key 'AAAA');
p.s. the text field is used as the keyword for free text = search.
when query from the = table:

Yes, but perhaps we could name the 'text' = column something like
'search' or ... someone else could help come up = with a better name. :)

2) SELECT = photo FROM flickr_table WHERE text =3D 'panda' LIMIT 0, = 10;
This will return top ten = photos relevant to 'panda'. Is my = understanding
correct?

Yes, the first ten = results.

I've briefly gone through the = slides. Regarding the 6 callbacks, is that
correct to say that a full table scan will always be = performed irregardless
of the = sql statement,
the FDW is = blind to the sql query performed, right?

That's = correct.

And can anyone help explain = what a planner is? What does this "provide = cost
estimates to planner" = mean? Thanks!

Have a look at this for a quick = overview:
= http://www.postgresql.org/docs/9.0/static/planner-optimizer.html
-selena

-- =
http://chesnok.com

= --Apple-Mail-1451-676480803--