Re: Feature proposal: www_fdw

Поиск
Список
Период
Сортировка
От Alexander Soudakov
Тема Re: Feature proposal: www_fdw
Дата
Msg-id CACCOprfvS8EyKPqK8ap_1=S0uEmuEKOGakSjazOoC2+6n4GGOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Feature proposal: www_fdw  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On Thu, Sep 29, 2011 at 1:20 AM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Florian Pflug <fgp@phlo.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@gmail.com
skype: asudakov


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [REVIEW] pg_last_xact_insert_timestamp
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [v9.2] make_greater_string() does not return a string in some cases