Re: Feature proposal: www_fdw

From: Alexander Soudakov <cygakob(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Feature proposal: www_fdw
Date: 2011-09-29 09:02:13
Message-ID: CACCOprfvS8EyKPqK8ap_1=S0uEmuEKOGakSjazOoC2+6n4GGOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 29, 2011 at 1:20 AM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Florian Pflug <fgp(at)phlo(dot)org> wrote:
>> 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)
>
> Our programmers agree that it is likely to be useful here.  I agree
> that it should be an extension.
>
>> What I didn't quite understand is how one would pass (dynamic)
>> parameters for a GET request. For example, not too long ago I
>> needed to access the Google Maps API from postgres. I ended up
>> using pl/python, and now wonder if your FDW would support that
>> use-case.
>
> I would assume that the usual ? to start parameters and & between
> parameters would be used.  For example, with Google Maps:
>
> http://maps.google.com/maps?hl=en&ie=UTF8&hq=&hnear=Madison,+Dane,+Wisconsin&ll=43.074684,-89.38188&spn=0.003006,0.00383&t=h&z=18&layer=c&cbll=43.07468,-89.381742&panoid=LhJ-PFHVzxRguJ6h616mmQ&cbp=12,355.53,,0,-1.32
>
> -Kevin
>

There would be an option to specify callback for forming request
(request_serialize_callback):
it would be passed with configuration parameters, details of the query
and action (currently it's only SELECT).
So it can:
* add specific parameters (like developer key)
* change column name to query parameter name (for eg: column name -
"column", query parameter - "q")
* create dynamic parameter

And return query string via output parameter "uri".
Also I plan to add output parameter "request" of composite type for
future to use it for passing any post parameters (or some other http
headers specific to api).

--
Alexander Soudakov
Developer Programmer
email: cygakoB(at)gmail(dot)com
skype: asudakov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2011-09-29 10:24:26 Re: [v9.2] make_greater_string() does not return a string in some cases
Previous Message Kyotaro HORIGUCHI 2011-09-29 08:26:31 Re: [REVIEW] Generate column names for subquery expressions