Re: Feature proposal: www_fdw - Mailing list pgsql-hackers

From Dickson S. Guedes
Subject Re: Feature proposal: www_fdw
Date
Msg-id CAHHcrer02jPn_B+p-1ZWE5fOsPxnNuppyHTT0x2KTL9hte-3Jw@mail.gmail.com
Whole thread Raw
In response to Re: Feature proposal: www_fdw  (Florian Pflug <fgp@phlo.org>)
Responses Re: Feature proposal: www_fdw
List pgsql-hackers
2011/9/28 Florian Pflug <fgp@phlo.org>:
> On Sep28, 2011, at 15:32 , Alexander Soudakov wrote:
>> Here you can find www_fdw feature documentation:
>> http://wiki.postgresql.org/wiki/WWW_FDW
>
> Certainly looks useful (as a third-party extension, as others have already pointed out)

+1.

> What I didn't quite understand is how one would pass (dynamic) parameters for a GET request. For example, not too
longago I needed to access the Google Maps API from postgres. I ended up using pl/python, and now wonder if your FDW
wouldsupport that use-case. 


I'm working on a google_contacts_fdw to google contacts api [1] but
stopped in the authentication design. As you can see in [2], for
google api, you should get an authorization token and store the "Auth"
value to use latter on the same "session". I'm wondering how the best
way to "cache" this value as long as possible, because actually, when
you need authentication for a FDW, you use the
fdw_routine->BeginForeignScan call function but, in this situation,
each SELECT to foreign table will do the handshake and some APIs could
block this. Many client libraries work fine, caching the Auth value.
How WWW_FDW could play with behaviors like that, since other Web APIs
has the a authorization system like this [2]?


[1] http://code.google.com/apis/contacts/docs/3.0/developers_guide.html
[2] http://code.google.com/apis/gdata/articles/using_cURL.html


Regards.
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br


pgsql-hackers by date:

Previous
From: "MauMau"
Date:
Subject: Re: Does RelCache/SysCache shrink except when relations are deleted?
Next
From: Alvaro Herrera
Date:
Subject: Re: Does RelCache/SysCache shrink except when relations are deleted?