Re: foreign data wrappers - Mailing list pgsql-students

From Zheng Yang
Subject Re: foreign data wrappers
Date
Msg-id DF55FA8B-B241-4C2F-803C-424D264B5AF3@gmail.com
Whole thread Raw
In response to Re: foreign data wrappers  (Selena Deckelmann <selena@chesnok.com>)
Responses Re: foreign data wrappers  (Dave Page <dpage@pgadmin.org>)
List pgsql-students
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. 
I followed the working with git instructions here:


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!

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 = '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

pgsql-students by date:

Previous
From: Selena Deckelmann
Date:
Subject: Re: foreign data wrappers
Next
From: Dave Page
Date:
Subject: Re: foreign data wrappers