On Fri, Aug 9, 2013 at 2:44 AM, Szymon Guz <mabew...@gmail.com> wrote:

>
> Do we have any attempts of implementation the HTTP server described at
> http://wiki.postgresql.org/wiki/HTTP_API?
>
> It seems like there are design ideas only. Are there any ideas about
> implementation like using some existing http servers or writing everything
> from scratch?
>

I recently threw together a quick-and-dirty prototype of this idea.  It was
an external tool which used the libmicrohttpd library to accept incoming
requests, convert them to a SQL query (which called a stored procedure),
and return the query results.  (It allowed *any* content-type to be
returned, not just JSON.)  I only got as far as handling GET requests.  The
code is available here:

  http://code.malloclabs.com/pghttpd.v1

I'm also aware of an nginx module (ngx_postgres) that lets you transform
requests into queries against a Postgres database, but it isn't "generic"
-- you have to configure it for each URL that should be handled.


Regards,
Andrew Tipton

Reply via email to